Module spring.data.cassandra
Class QueryMapper
java.lang.Object
org.springframework.data.cassandra.core.convert.QueryMapper
- Direct Known Subclasses:
UpdateMapper
Map
Query to CQL-specific data types.- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classValue object to represent a field and its meta-information.protected static classExtension ofQueryMapper.Fieldto be backed with mapping metadata. -
Constructor Summary
ConstructorsConstructorDescriptionQueryMapper(CassandraConverter converter) Creates a newQueryMapperwith the givenCassandraConverter. -
Method Summary
Modifier and TypeMethodDescriptionReturns the configuredCassandraConverterused to convert object values into Cassandra column typed values.List<com.datastax.oss.driver.api.core.CqlIdentifier>getMappedColumnNames(Columns columns, CassandraPersistentEntity<?> entity) getMappedObject(Filter filter, CassandraPersistentEntity<?> entity) getMappedSelectors(Columns columns, CassandraPersistentEntity<?> entity) getMappedSort(Sort sort, CassandraPersistentEntity<?> entity) protected CassandraMappingContextReturns the configuredMappingContextcontaining mapping meta-data (persistent entities and properties) used to store (map) objects to Cassandra tables (rows/columns).
-
Constructor Details
-
QueryMapper
Creates a newQueryMapperwith the givenCassandraConverter.- Parameters:
converter- must not be null.
-
-
Method Details
-
getConverter
Returns the configuredCassandraConverterused to convert object values into Cassandra column typed values.- Returns:
- the configured
CassandraConverter. - See Also:
-
getMappingContext
Returns the configuredMappingContextcontaining mapping meta-data (persistent entities and properties) used to store (map) objects to Cassandra tables (rows/columns).- Returns:
- the configured
MappingContext.
-
getMappedObject
Map aFilterwith atype hint. Filter mapping translates property names to column names and mapsCriteriaDefinition.Predicatevalues to simple Cassandra values.- Parameters:
filter- must not be null.entity- must not be null.- Returns:
- the mapped
Filter.
-
getMappedSelectors
public List<Columns.Selector> getMappedSelectors(Columns columns, CassandraPersistentEntity<?> entity) - Parameters:
columns- must not be null.entity- must not be null.- Returns:
- the mapped
Columns.Selectors.
-
getMappedColumnNames
public List<com.datastax.oss.driver.api.core.CqlIdentifier> getMappedColumnNames(Columns columns, CassandraPersistentEntity<?> entity) MapColumnswith atype hintto column names for included columns. Function call selectors or otherColumns.Selectortypes are not included.- Parameters:
columns- must not be null.entity- must not be null.- Returns:
- the mapped column names.
-
getMappedSort
-