All Known Subinterfaces:
AssociationInverseSideOptionsStep, IndexingDependencyOptionsStep, PropertyMappingDocumentIdOptionsStep, PropertyMappingFieldOptionsStep<S>, PropertyMappingFullTextFieldOptionsStep, PropertyMappingGenericFieldOptionsStep, PropertyMappingIndexedEmbeddedStep, PropertyMappingKeywordFieldOptionsStep, PropertyMappingNonFullTextFieldOptionsStep<S>, PropertyMappingScaledNumberFieldOptionsStep, PropertyMappingStandardFieldOptionsStep<S>

public interface PropertyMappingStep
The step in a mapping definition where a property can be mapped.
  • Method Details

    • hostingType

      TypeMappingStep hostingType()
      Returns:
      A DSL step where the mapping can be defined for the type hosting this property.
    • documentId

      Maps the property to the identifier of documents in the index.

      This is only taken into account on Indexed types.

      Returns:
      A DSL step where the document ID mapping can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • binder

      default PropertyMappingStep binder(PropertyBinder binder)
      Define a property binder, responsible for creating a bridge. To pass some parameters to the bridge, use the method binder(PropertyBinder, Map) instead.
      Parameters:
      binder - A PropertyBinder responsible for creating a bridge.
      Returns:
      this, for method chaining.
      See Also:
    • binder

      Define a property binder, responsible for creating a bridge. With this method it is possible to pass a set of parameters to the binder.
      Parameters:
      binder - A PropertyBinder responsible for creating a bridge.
      params - The parameters to pass to the binder.
      Returns:
      this, for method chaining.
    • marker

      default PropertyMappingStep marker(MarkerBinder binder)
      Define a marker binder, responsible for creating a marker object. To use some parameters to create the marker object, use the method marker(MarkerBinder, Map) instead.
      Parameters:
      binder - A MarkerBinder responsible for creating a marker object.
      Returns:
      this, for method chaining.
      See Also:
    • marker

      PropertyMappingStep marker(MarkerBinder binder, Map<String,Object> params)
      Define a marker binder, responsible for creating a marker object. With this method it is possible to pass a set of parameters to the binder, so that they can be used to create the marker object.
      Parameters:
      binder - A MarkerBinder responsible for creating a marker object.
      params - The parameters to pass to the binder.
      Returns:
      this, for method chaining.
      See Also:
    • genericField

      Maps the property to a field of standard type in the index with the same name as this property.
      Returns:
      A DSL step where the field mapping can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • genericField

      PropertyMappingGenericFieldOptionsStep genericField(String relativeFieldName)
      Maps the property to a field of standard type in the index with a custom name.
      Parameters:
      relativeFieldName - The name of the index field.
      Returns:
      A DSL step where the field mapping can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • fullTextField

      Maps the property to a full-text field in the index with the same name as this property.
      Returns:
      A DSL step where the field mapping can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • fullTextField

      PropertyMappingFullTextFieldOptionsStep fullTextField(String relativeFieldName)
      Maps the property to a full-text field in the index with a custom name.
      Parameters:
      relativeFieldName - The name of the index field.
      Returns:
      A DSL step where the field mapping can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • keywordField

      Maps the property to a keyword field in the index with the same name as this property.
      Returns:
      A DSL step where the field mapping can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • keywordField

      PropertyMappingKeywordFieldOptionsStep keywordField(String relativeFieldName)
      Maps the property to a keyword field in the index with a custom name.
      Parameters:
      relativeFieldName - The name of the index field.
      Returns:
      A DSL step where the field mapping can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • scaledNumberField

      Maps the property to a scaled number field in the index with the same name as this property.
      Returns:
      A DSL step where the field mapping can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • scaledNumberField

      PropertyMappingScaledNumberFieldOptionsStep scaledNumberField(String relativeFieldName)
      Maps the property to a scaled number field in the index with a custom name.
      Parameters:
      relativeFieldName - The name of the index field.
      Returns:
      A DSL step where the field mapping can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • nonStandardField

      PropertyMappingFieldOptionsStep<?> nonStandardField()
      Maps the property to a field of non-standard type in the index with the same name as this property.

      This is for advanced use cases, when defining a field whose type is only supported in a specific backend.

      Returns:
      A DSL step where the field mapping can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • nonStandardField

      PropertyMappingFieldOptionsStep<?> nonStandardField(String relativeFieldName)
      Maps the property to a field of non-standard type in the index with a custom name.

      This is for advanced use cases, when defining a field whose type is only supported in a specific backend.

      Parameters:
      relativeFieldName - The name of the index field.
      Returns:
      A DSL step where the field mapping can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • indexedEmbedded

      Maps the property to an object field whose fields are the same as those defined in the property type, using the name of this property as the name of the object field.
      Returns:
      A DSL step where the indexed-embedded mapping can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • indexedEmbedded

      PropertyMappingIndexedEmbeddedStep indexedEmbedded(String relativeFieldName)
      Maps the property to an object field whose fields are the same as those defined in the property type, using the given custom name as the name of the object field.
      Parameters:
      relativeFieldName - The name of the object field created for this indexed-embedded mapping.
      Returns:
      A DSL step where the indexed-embedded mapping can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • associationInverseSide

      AssociationInverseSideOptionsStep associationInverseSide(PojoModelPathValueNode inversePath)
      Assuming the property represents an association on a entity type A to entity type B, defines the inverse side of an association, i.e. the path from B to A.

      This is generally not needed, as inverse sides of associations should generally be inferred by the mapper. For example, Hibernate ORM defines inverse sides using @OneToMany#mappedBy, @OneToOne#mappedBy, etc., and the Hibernate ORM mapper will register these inverse sides automatically.

      Parameters:
      inversePath - The path representing the inverse side of the association.
      Returns:
      A DSL step where the association's inverse side can be defined in more details, or where other elements can be mapped to the property.
      See Also:
    • indexingDependency

      IndexingDependencyOptionsStep indexingDependency()
      Defines how a dependency of the indexing process to this property should affect automatic reindexing.
      Returns:
      A DSL step where indexing dependency can be defined in more details, or where other elements can be mapped to the property.