Interface IndexSchemaElement
- All Known Subinterfaces:
IndexSchemaObjectField
public interface IndexSchemaElement
An element of the index schema,
allowing the definition of child fields.
-
Method Summary
Modifier and TypeMethodDescriptionfield
(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.default <F> IndexSchemaFieldOptionsStep<?,
IndexFieldReference<F>> field
(String relativeFieldName, IndexFieldTypeFinalStep<F> dslFinalStep) Add a field to this index schema element with the given almost-built type.field
(String relativeFieldName, IndexFieldType<F> type) Add a field to this index schema element with the given type.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.default IndexSchemaFieldTemplateOptionsStep<?>
fieldTemplate
(String templateName, IndexFieldTypeFinalStep<?> dslFinalStep) Add a field template to this index schema element with the given almost-built type.fieldTemplate
(String templateName, IndexFieldType<?> type) Add a field template to this index schema element with the given type.namedPredicate
(String relativeNamedPredicateName, PredicateDefinition definition) Add a named predicate factory to this index schema element.default IndexSchemaObjectField
objectField
(String relativeFieldName) Add an object field to this index schema element with the default structure.objectField
(String relativeFieldName, ObjectStructure structure) Add an object field to this index schema element with the given structure.default IndexSchemaFieldTemplateOptionsStep<?>
objectFieldTemplate
(String templateName) Add an object field template to this index schema element with the default structure.objectFieldTemplate
(String templateName, ObjectStructure structure) Add an object field template to this index schema element with the given structure.
-
Method Details
-
field
<F> IndexSchemaFieldOptionsStep<?,IndexFieldReference<F>> field(String relativeFieldName, IndexFieldType<F> type) Add a field to this index schema element with the given type.- 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.
-
field
default <F> IndexSchemaFieldOptionsStep<?,IndexFieldReference<F>> field(String relativeFieldName, IndexFieldTypeFinalStep<F> dslFinalStep) Add a field to this index schema element with the given almost-built type.- Type Parameters:
F
- The type of values held by the field.- Parameters:
relativeFieldName
- The relative name of the field.dslFinalStep
- A final step in the index field type DSL allowing the retrieval of anIndexFieldType
.- Returns:
- A DSL step where the field can be defined in more details,
and where a
a reference to the field
can be obtained.
-
field
<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.Best used with lambda expressions.
- 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.
-
namedPredicate
@Incubating IndexSchemaNamedPredicateOptionsStep namedPredicate(String relativeNamedPredicateName, PredicateDefinition definition) Add a named predicate factory to this index schema element.- 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:
-
objectField
Add an object field to this index schema element with the default structure.- Parameters:
relativeFieldName
- The relative name of the 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 field
can be obtained.
-
objectField
Add an object field to this index schema element with the given structure.- 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 field
can be obtained. - See Also:
-
fieldTemplate
Add a field template to this index schema element with the given type.- 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
default IndexSchemaFieldTemplateOptionsStep<?> fieldTemplate(String templateName, IndexFieldTypeFinalStep<?> dslFinalStep) Add a field template to this index schema element with the given almost-built type.- 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.dslFinalStep
- A final step in the index field type DSL allowing the retrieval of anIndexFieldType
.- Returns:
- A DSL step where the field template can be defined in more details.
-
fieldTemplate
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.Best used with lambda expressions.
- 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
Add an object field template to this index schema element with the default structure.- 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.- Returns:
- A DSL step where the field template can be defined in more details.
-
objectFieldTemplate
IndexSchemaFieldTemplateOptionsStep<?> objectFieldTemplate(String templateName, ObjectStructure structure) Add an object field template to this index schema element with the given structure.- 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:
-