Class IndexSchemaElementImpl<B extends IndexCompositeNodeBuilder>
- java.lang.Object
-
- org.hibernate.search.engine.backend.document.model.dsl.impl.IndexSchemaElementImpl<B>
-
- All Implemented Interfaces:
IndexSchemaElement
public class IndexSchemaElementImpl<B extends IndexCompositeNodeBuilder> extends Object implements IndexSchemaElement
-
-
Constructor Summary
Constructors Constructor Description IndexSchemaElementImpl(IndexFieldTypeFactory typeFactory, B objectNodeBuilder, TreeNestingContext nestingContext, boolean directChildrenAreMultiValuedByDefault)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <F> IndexSchemaFieldOptionsStep<?,IndexFieldReference<F>>field(String relativeFieldName, Function<? super IndexFieldTypeFactory,? extends IndexFieldTypeFinalStep<F>> typeContributor)Add a field to this index schema element with the type to be defined by the given function.<F> IndexSchemaFieldOptionsStep<?,IndexFieldReference<F>>field(String relativeFieldName, IndexFieldType<F> type)Add a field to this index schema element with the given type.IndexSchemaFieldTemplateOptionsStep<?>fieldTemplate(String templateName, Function<? super IndexFieldTypeFactory,? extends IndexFieldTypeFinalStep<?>> typeContributor)Add a field to this index schema element with the type to be defined by the given function.IndexSchemaFieldTemplateOptionsStep<?>fieldTemplate(String templateName, IndexFieldType<?> type)Add a field template to this index schema element with the given type.IndexSchemaNamedPredicateOptionsStepnamedPredicate(String relativeNamedPredicateName, PredicateDefinition definition)Add a named predicate factory to this index schema element.IndexSchemaObjectFieldobjectField(String relativeFieldName, ObjectStructure structure)Add an object field to this index schema element with the given structure.IndexSchemaFieldTemplateOptionsStep<?>objectFieldTemplate(String templateName, ObjectStructure structure)Add an object field template to this index schema element with the given structure.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaElement
field, fieldTemplate, objectField, objectFieldTemplate
-
-
-
-
Constructor Detail
-
IndexSchemaElementImpl
public IndexSchemaElementImpl(IndexFieldTypeFactory typeFactory, B objectNodeBuilder, TreeNestingContext nestingContext, boolean directChildrenAreMultiValuedByDefault)
-
-
Method Detail
-
field
public <F> IndexSchemaFieldOptionsStep<?,IndexFieldReference<F>> field(String relativeFieldName, IndexFieldType<F> type)
Description copied from interface:IndexSchemaElementAdd a field to this index schema element with the given type.- Specified by:
fieldin interfaceIndexSchemaElement- Type Parameters:
F- The type of values held by the field.- Parameters:
relativeFieldName- The relative name of the field.type- The type of the new field.- Returns:
- A DSL step where the field can be defined in more details,
and where a
a reference to the fieldcan be obtained.
-
namedPredicate
public IndexSchemaNamedPredicateOptionsStep namedPredicate(String relativeNamedPredicateName, PredicateDefinition definition)
Description copied from interface:IndexSchemaElementAdd a named predicate factory to this index schema element.- Specified by:
namedPredicatein interfaceIndexSchemaElement- Parameters:
relativeNamedPredicateName- The relative name of the new named predicate.definition- The definition of the named predicate.- Returns:
- A DSL step where the named predicate can be defined in more details.
- See Also:
PredicateDefinition
-
field
public <F> IndexSchemaFieldOptionsStep<?,IndexFieldReference<F>> field(String relativeFieldName, Function<? super IndexFieldTypeFactory,? extends IndexFieldTypeFinalStep<F>> typeContributor)
Description copied from interface:IndexSchemaElementAdd a field to this index schema element with the type to be defined by the given function.Best used with lambda expressions.
- Specified by:
fieldin interfaceIndexSchemaElement- Type Parameters:
F- The type of values held by the field.- Parameters:
relativeFieldName- The relative name of the field.typeContributor- A function that will use the factory passed in parameter to create a type, returning the final step in the predicate DSL. Should generally be a lambda expression.- Returns:
- A DSL step where the field can be defined in more details,
and where a
a reference to the fieldcan be obtained.
-
objectField
public IndexSchemaObjectField objectField(String relativeFieldName, ObjectStructure structure)
Description copied from interface:IndexSchemaElementAdd an object field to this index schema element with the given structure.- Specified by:
objectFieldin interfaceIndexSchemaElement- Parameters:
relativeFieldName- The relative name of the field.structure- The structure of the object field.- Returns:
- An
IndexSchemaObjectField, where the field can be defined in more details, in particular by adding new child fields to it, and where ultimately aa reference to the fieldcan be obtained. - See Also:
ObjectStructure
-
fieldTemplate
public IndexSchemaFieldTemplateOptionsStep<?> fieldTemplate(String templateName, IndexFieldType<?> type)
Description copied from interface:IndexSchemaElementAdd a field template to this index schema element with the given type.- Specified by:
fieldTemplatein interfaceIndexSchemaElement- Parameters:
templateName- The name of the template. Must be non-null and non-empty. Must be unique for this index schema element. Must not contain the dot ('.') character.type- The type of fields created by this template.- Returns:
- A DSL step where the field template can be defined in more details.
-
fieldTemplate
public IndexSchemaFieldTemplateOptionsStep<?> fieldTemplate(String templateName, Function<? super IndexFieldTypeFactory,? extends IndexFieldTypeFinalStep<?>> typeContributor)
Description copied from interface:IndexSchemaElementAdd a field to this index schema element with the type to be defined by the given function.Best used with lambda expressions.
- Specified by:
fieldTemplatein interfaceIndexSchemaElement- Parameters:
templateName- The name of the template. Must be non-null and non-empty. Must be unique for this index schema element. Must not contain the dot ('.') character.typeContributor- A function that will use the factory passed in parameter to create a type, returning the final step in the predicate DSL. Should generally be a lambda expression.- Returns:
- A DSL step where the field template can be defined in more details.
-
objectFieldTemplate
public IndexSchemaFieldTemplateOptionsStep<?> objectFieldTemplate(String templateName, ObjectStructure structure)
Description copied from interface:IndexSchemaElementAdd an object field template to this index schema element with the given structure.- Specified by:
objectFieldTemplatein interfaceIndexSchemaElement- Parameters:
templateName- The name of the template. Must be non-null and non-empty. Must be unique for this index schema element. Must not contain the dot ('.') character.structure- The structure of object fields created by this template.- Returns:
- A DSL step where the field template can be defined in more details.
- See Also:
ObjectStructure
-
-