Class IndexSchemaElementImpl<B extends IndexCompositeNodeBuilder>

    • Constructor Detail

      • IndexSchemaElementImpl

        public IndexSchemaElementImpl​(IndexFieldTypeFactory typeFactory,
                                      B objectNodeBuilder,
                                      TreeNestingContext nestingContext,
                                      boolean directChildrenAreMultiValuedByDefault)
    • Method Detail

      • 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.
      • 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:
        ObjectStructure