Interface PropertyMappingStep
-
- All Known Subinterfaces:
AssociationInverseSideOptionsStep,IndexingDependencyOptionsStep,PropertyMappingDocumentIdOptionsStep,PropertyMappingFieldOptionsStep<S>,PropertyMappingFullTextFieldOptionsStep,PropertyMappingGenericFieldOptionsStep,PropertyMappingIndexedEmbeddedStep,PropertyMappingKeywordFieldOptionsStep,PropertyMappingNonFullTextFieldOptionsStep<S>,PropertyMappingScaledNumberFieldOptionsStep,PropertyMappingStandardFieldOptionsStep<S>
public interface PropertyMappingStepThe step in a mapping definition where a property can be mapped.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description AssociationInverseSideOptionsStepassociationInverseSide(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.default PropertyMappingStepbinder(PropertyBinder binder)Define a property binder, responsible for creating a bridge.PropertyMappingStepbinder(PropertyBinder binder, Map<String,Object> params)Define a property binder, responsible for creating a bridge.PropertyMappingDocumentIdOptionsStepdocumentId()Maps the property to the identifier of documents in the index.PropertyMappingFullTextFieldOptionsStepfullTextField()Maps the property to a full-text field in the index with the same name as this property.PropertyMappingFullTextFieldOptionsStepfullTextField(String relativeFieldName)Maps the property to a full-text field in the index with a custom name.PropertyMappingGenericFieldOptionsStepgenericField()Maps the property to a field of standard type in the index with the same name as this property.PropertyMappingGenericFieldOptionsStepgenericField(String relativeFieldName)Maps the property to a field of standard type in the index with a custom name.TypeMappingStephostingType()PropertyMappingIndexedEmbeddedStepindexedEmbedded()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.PropertyMappingIndexedEmbeddedStepindexedEmbedded(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.IndexingDependencyOptionsStepindexingDependency()Defines how a dependency of the indexing process to this property should affect automatic reindexing.PropertyMappingKeywordFieldOptionsStepkeywordField()Maps the property to a keyword field in the index with the same name as this property.PropertyMappingKeywordFieldOptionsStepkeywordField(String relativeFieldName)Maps the property to a keyword field in the index with a custom name.default PropertyMappingStepmarker(MarkerBinder binder)Define a marker binder, responsible for creating a marker object.PropertyMappingStepmarker(MarkerBinder binder, Map<String,Object> params)Define a marker binder, responsible for creating a marker object.PropertyMappingFieldOptionsStep<?>nonStandardField()Maps the property to a field of non-standard type in the index with the same name as this property.PropertyMappingFieldOptionsStep<?>nonStandardField(String relativeFieldName)Maps the property to a field of non-standard type in the index with a custom name.PropertyMappingScaledNumberFieldOptionsStepscaledNumberField()Maps the property to a scaled number field in the index with the same name as this property.PropertyMappingScaledNumberFieldOptionsStepscaledNumberField(String relativeFieldName)Maps the property to a scaled number field in the index with a custom name.
-
-
-
Method Detail
-
hostingType
TypeMappingStep hostingType()
- Returns:
- A DSL step where the mapping can be defined for the type hosting this property.
-
documentId
PropertyMappingDocumentIdOptionsStep documentId()
Maps the property to the identifier of documents in the index.This is only taken into account on
Indexedtypes.- 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:
DocumentId
-
binder
default PropertyMappingStep binder(PropertyBinder binder)
Define a property binder, responsible for creating a bridge. To pass some parameters to the bridge, use the methodbinder(PropertyBinder, Map)instead.- Parameters:
binder- APropertyBinderresponsible for creating a bridge.- Returns:
this, for method chaining.- See Also:
PropertyBinder
-
binder
PropertyMappingStep binder(PropertyBinder binder, Map<String,Object> params)
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- APropertyBinderresponsible 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 methodmarker(MarkerBinder, Map)instead.- Parameters:
binder- AMarkerBinderresponsible for creating a marker object.- Returns:
this, for method chaining.- See Also:
MarkerBinder,GeoPointBinder.latitude(),GeoPointBinder.longitude()
-
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- AMarkerBinderresponsible for creating a marker object.params- The parameters to pass to the binder.- Returns:
this, for method chaining.- See Also:
MarkerBinder,GeoPointBinder.latitude(),GeoPointBinder.longitude()
-
genericField
PropertyMappingGenericFieldOptionsStep 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
-
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:
GenericField,GenericField.name()
-
fullTextField
PropertyMappingFullTextFieldOptionsStep 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
-
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:
FullTextField,FullTextField.name()
-
keywordField
PropertyMappingKeywordFieldOptionsStep 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
-
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:
KeywordField,KeywordField.name()
-
scaledNumberField
PropertyMappingScaledNumberFieldOptionsStep 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
-
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:
ScaledNumberField,ScaledNumberField.name()
-
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
-
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:
NonStandardField,NonStandardField.name()
-
indexedEmbedded
PropertyMappingIndexedEmbeddedStep 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
-
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:
IndexedEmbedded,IndexedEmbedded.name()
-
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:
AssociationInverseSide,PojoModelPath.ofValue(String),PojoModelPath.ofValue(String, ContainerExtractorPath),PojoModelPath.builder()
-
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.
-
-