public class SetBasedFieldSelector extends java.lang.Object implements FieldSelector
Constructor and Description |
---|
SetBasedFieldSelector(java.util.Set fieldsToLoad,
java.util.Set lazyFieldsToLoad)
|
Modifier and Type | Method and Description |
---|---|
FieldSelectorResult |
accept(java.lang.String fieldName)
Indicate whether to load the field with the given name or not.
|
public SetBasedFieldSelector(java.util.Set fieldsToLoad, java.util.Set lazyFieldsToLoad)
Field
names to load and the Set of Field
names to load lazily. If both are null, the
Document will not have any Field
on it.fieldsToLoad
- A Set of String
field names to load. May be empty, but not nulllazyFieldsToLoad
- A Set of String
field names to load lazily. May be empty, but not nullpublic FieldSelectorResult accept(java.lang.String fieldName)
AbstractField.name()
is not in either of the
initializing Sets, then FieldSelectorResult.NO_LOAD
is returned. If a Field name
is in both fieldsToLoad
and lazyFieldsToLoad
, lazy has precedence.accept
in interface FieldSelector
fieldName
- The Field
name to checkFieldSelectorResult
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.