Class QueryMapper.MetadataBackedField
java.lang.Object
org.springframework.data.cassandra.core.convert.QueryMapper.Field
org.springframework.data.cassandra.core.convert.QueryMapper.MetadataBackedField
- Enclosing class:
- QueryMapper
Extension of
QueryMapper.Field
to be backed with mapping metadata.- Author:
- Mark Paluch
-
Field Summary
Fields inherited from class org.springframework.data.cassandra.core.convert.QueryMapper.Field
name
-
Constructor Summary
ConstructorsConstructorDescriptionMetadataBackedField
(ColumnName name, CassandraPersistentEntity<?> entity, MappingContext<? extends CassandraPersistentEntity<?>, CassandraPersistentProperty> mappingContext) Creates a newQueryMapper.MetadataBackedField
with the given name,CassandraPersistentEntity
andMappingContext
.MetadataBackedField
(ColumnName name, CassandraPersistentEntity<?> entity, MappingContext<? extends CassandraPersistentEntity<?>, CassandraPersistentProperty> mappingContext, CassandraPersistentProperty property) Creates a newQueryMapper.MetadataBackedField
with the given name,CassandraPersistentProperty
andMappingContext
with the givenCassandraPersistentProperty
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the key to be used in the mapped document eventually.Returns the underlyingCassandraPersistentProperty
backing the field.with
(ColumnName name) Returns a newQueryMapper.Field
with the given name.
-
Constructor Details
-
MetadataBackedField
public MetadataBackedField(ColumnName name, CassandraPersistentEntity<?> entity, MappingContext<? extends CassandraPersistentEntity<?>, CassandraPersistentProperty> mappingContext) Creates a newQueryMapper.MetadataBackedField
with the given name,CassandraPersistentEntity
andMappingContext
.- Parameters:
name
- must not be null or empty.entity
- must not be null.mappingContext
- must not be null.
-
MetadataBackedField
public MetadataBackedField(ColumnName name, CassandraPersistentEntity<?> entity, MappingContext<? extends CassandraPersistentEntity<?>, CassandraPersistentProperty> mappingContext, @Nullable CassandraPersistentProperty property) Creates a newQueryMapper.MetadataBackedField
with the given name,CassandraPersistentProperty
andMappingContext
with the givenCassandraPersistentProperty
.- Parameters:
name
- must not be null or empty.entity
- must not be null.mappingContext
- must not be null.property
- may be null.
-
-
Method Details
-
with
Description copied from class:QueryMapper.Field
Returns a newQueryMapper.Field
with the given name.- Overrides:
with
in classQueryMapper.Field
- Parameters:
name
- must not be null or empty.- Returns:
- a new
QueryMapper.Field
with the given name.
-
getProperty
Description copied from class:QueryMapper.Field
Returns the underlyingCassandraPersistentProperty
backing the field. For path traversals this will be the property that represents the value to handle. This means it'll be the leaf property for plain paths or the association property in case we refer to an association somewhere in the path.- Overrides:
getProperty
in classQueryMapper.Field
-
getMappedKey
Description copied from class:QueryMapper.Field
Returns the key to be used in the mapped document eventually.- Overrides:
getMappedKey
in classQueryMapper.Field
-