Class AbstractIndexObjectField<S extends AbstractIndexObjectField<S,SC,NT,C,F>,SC extends SearchIndexScope<?>,NT extends AbstractIndexCompositeNodeType<SC,? super S>,C extends IndexCompositeNode<SC,NT,F>,F extends IndexField<SC,?>>
- java.lang.Object
-
- org.hibernate.search.engine.backend.document.model.spi.AbstractIndexNode<S,SC,NT>
-
- org.hibernate.search.engine.backend.document.model.spi.AbstractIndexField<S,SC,NT,C>
-
- org.hibernate.search.engine.backend.document.model.spi.AbstractIndexObjectField<S,SC,NT,C,F>
-
- All Implemented Interfaces:
IndexCompositeNode<SC,NT,F>
,IndexField<SC,C>
,IndexNode<SC>
,IndexObjectField<SC,NT,C,F>
,IndexCompositeElementDescriptor
,IndexFieldDescriptor
,IndexObjectFieldDescriptor
,SearchIndexCompositeNodeContext<SC>
,SearchIndexNodeContext<SC>
,EventContextProvider
public abstract class AbstractIndexObjectField<S extends AbstractIndexObjectField<S,SC,NT,C,F>,SC extends SearchIndexScope<?>,NT extends AbstractIndexCompositeNodeType<SC,? super S>,C extends IndexCompositeNode<SC,NT,F>,F extends IndexField<SC,?>> extends AbstractIndexField<S,SC,NT,C> implements IndexObjectField<SC,NT,C,F>
-
-
Field Summary
-
Fields inherited from class org.hibernate.search.engine.backend.document.model.spi.AbstractIndexField
absolutePath, absolutePathComponents, inclusion, multiValued, multiValuedInRoot, parent, relativeName
-
Fields inherited from class org.hibernate.search.engine.backend.document.model.spi.AbstractIndexNode
type
-
-
Constructor Summary
Constructors Constructor Description AbstractIndexObjectField(C parent, String relativeFieldName, NT type, IndexFieldInclusion inclusion, boolean multiValued, Map<String,F> notYetInitializedStaticChildren)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
absolutePath(String relativeFieldName)
boolean
isComposite()
boolean
isObjectField()
boolean
isRoot()
boolean
isValueField()
List<String>
nestedPathHierarchy()
Map<String,F>
staticChildrenByName()
Get all statically-defined, direct child fields for this element, mapped by theirrelative name
.S
toObjectField()
IndexValueField<SC,?,C>
toValueField()
-
Methods inherited from class org.hibernate.search.engine.backend.document.model.spi.AbstractIndexField
absolutePath, absolutePathComponents, inclusion, multiValued, multiValuedInRoot, parent, relativeEventContext, relativeName, toString
-
Methods inherited from class org.hibernate.search.engine.backend.document.model.spi.AbstractIndexNode
eventContext, queryElement, self, type
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.util.common.reporting.spi.EventContextProvider
eventContext
-
Methods inherited from interface org.hibernate.search.engine.backend.document.model.spi.IndexCompositeNode
staticChildren, type
-
Methods inherited from interface org.hibernate.search.engine.backend.document.model.spi.IndexField
parent, toComposite
-
Methods inherited from interface org.hibernate.search.engine.backend.metamodel.IndexFieldDescriptor
absolutePath, multiValued, multiValuedInRoot, relativeName
-
Methods inherited from interface org.hibernate.search.engine.backend.document.model.spi.IndexNode
inclusion, multiValuedInRoot
-
Methods inherited from interface org.hibernate.search.engine.backend.metamodel.IndexObjectFieldDescriptor
type
-
Methods inherited from interface org.hibernate.search.engine.search.common.spi.SearchIndexNodeContext
absolutePath, absolutePathComponents, nestedDocumentPath, queryElement, relativeEventContext
-
-
-
-
Method Detail
-
isRoot
public final boolean isRoot()
- Specified by:
isRoot
in interfaceIndexCompositeElementDescriptor
- Returns:
true
if this element represents the root of the index.
-
isComposite
public final boolean isComposite()
- Specified by:
isComposite
in interfaceSearchIndexNodeContext<S extends AbstractIndexObjectField<S,SC,NT,C,F>>
-
isObjectField
public final boolean isObjectField()
- Specified by:
isObjectField
in interfaceIndexCompositeElementDescriptor
- Specified by:
isObjectField
in interfaceIndexFieldDescriptor
- Returns:
true
if this field is an object field. In that case,IndexFieldDescriptor.toObjectField()
can be called safely (it won't throw an exception).
-
isValueField
public final boolean isValueField()
- Specified by:
isValueField
in interfaceIndexFieldDescriptor
- Specified by:
isValueField
in interfaceSearchIndexNodeContext<S extends AbstractIndexObjectField<S,SC,NT,C,F>>
- Returns:
true
if this field is a value field. In that case,IndexFieldDescriptor.toValueField()
can be called safely (it won't throw an exception).
-
toObjectField
public final S toObjectField()
- Specified by:
toObjectField
in interfaceIndexCompositeElementDescriptor
- Specified by:
toObjectField
in interfaceIndexField<S extends AbstractIndexObjectField<S,SC,NT,C,F>,SC extends SearchIndexScope<?>>
- Specified by:
toObjectField
in interfaceIndexFieldDescriptor
- Specified by:
toObjectField
in interfaceIndexNode<S extends AbstractIndexObjectField<S,SC,NT,C,F>>
- Returns:
- This field as an
IndexObjectFieldDescriptor
, if possible. Nevernull
.
-
toValueField
public IndexValueField<SC,?,C> toValueField()
- Specified by:
toValueField
in interfaceIndexField<S extends AbstractIndexObjectField<S,SC,NT,C,F>,SC extends SearchIndexScope<?>>
- Specified by:
toValueField
in interfaceIndexFieldDescriptor
- Specified by:
toValueField
in interfaceIndexNode<S extends AbstractIndexObjectField<S,SC,NT,C,F>>
- Specified by:
toValueField
in interfaceSearchIndexNodeContext<S extends AbstractIndexObjectField<S,SC,NT,C,F>>
- Returns:
- This field as an
IndexValueFieldDescriptor
, if possible. Nevernull
.
-
absolutePath
public final String absolutePath(String relativeFieldName)
- Specified by:
absolutePath
in interfaceSearchIndexCompositeNodeContext<S extends AbstractIndexObjectField<S,SC,NT,C,F>>
-
nestedPathHierarchy
public final List<String> nestedPathHierarchy()
- Specified by:
nestedPathHierarchy
in interfaceSearchIndexNodeContext<S extends AbstractIndexObjectField<S,SC,NT,C,F>>
-
staticChildrenByName
public final Map<String,F> staticChildrenByName()
Description copied from interface:IndexCompositeElementDescriptor
Get all statically-defined, direct child fields for this element, mapped by theirrelative name
.Only statically-defined fields are returned; fields created dynamically through
templates
are not included in the map.- Specified by:
staticChildrenByName
in interfaceIndexCompositeElementDescriptor
- Specified by:
staticChildrenByName
in interfaceIndexCompositeNode<S extends AbstractIndexObjectField<S,SC,NT,C,F>,SC extends SearchIndexScope<?>,NT extends AbstractIndexCompositeNodeType<SC,? super S>>
- Specified by:
staticChildrenByName
in interfaceSearchIndexCompositeNodeContext<S extends AbstractIndexObjectField<S,SC,NT,C,F>>
- Returns:
- A map containing all static child fields.
-
-