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 Details

  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • field

      public <F> IndexSchemaFieldOptionsStep<?,IndexFieldReference<F>> field(String relativeFieldName, IndexFieldType<F> type)
      Description copied from interface: IndexSchemaElement
      Add a field to this index schema element with the given type.
      Specified by:
      field in interface IndexSchemaElement
      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 field can be obtained.
    • namedPredicate

      public IndexSchemaNamedPredicateOptionsStep namedPredicate(String relativeNamedPredicateName, PredicateDefinition definition)
      Description copied from interface: IndexSchemaElement
      Add a named predicate factory to this index schema element.
      Specified by:
      namedPredicate in interface IndexSchemaElement
      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:
    • field

      public <F> IndexSchemaFieldOptionsStep<?,IndexFieldReference<F>> field(String relativeFieldName, Function<? super IndexFieldTypeFactory,? extends IndexFieldTypeFinalStep<F>> typeContributor)
      Description copied from interface: IndexSchemaElement
      Add a field to this index schema element with the type to be defined by the given function.

      Best used with lambda expressions.

      Specified by:
      field in interface IndexSchemaElement
      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 field can be obtained.
    • objectField

      public IndexSchemaObjectField objectField(String relativeFieldName, ObjectStructure structure)
      Description copied from interface: IndexSchemaElement
      Add an object field to this index schema element with the given structure.
      Specified by:
      objectField in interface IndexSchemaElement
      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 a a reference to the field can be obtained.
      See Also:
    • fieldTemplate

      public IndexSchemaFieldTemplateOptionsStep<?> fieldTemplate(String templateName, IndexFieldType<?> type)
      Description copied from interface: IndexSchemaElement
      Add a field template to this index schema element with the given type.
      Specified by:
      fieldTemplate in interface IndexSchemaElement
      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: IndexSchemaElement
      Add a field to this index schema element with the type to be defined by the given function.

      Best used with lambda expressions.

      Specified by:
      fieldTemplate in interface IndexSchemaElement
      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: IndexSchemaElement
      Add an object field template to this index schema element with the given structure.
      Specified by:
      objectFieldTemplate in interface IndexSchemaElement
      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: