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 class
Value object to represent a field and its meta-information.protected static class
Extension ofQueryMapper.Field
to be backed with mapping metadata. -
Constructor Summary
ConstructorsConstructorDescriptionQueryMapper
(CassandraConverter converter) Creates a newQueryMapper
with the givenCassandraConverter
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the configuredCassandraConverter
used 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 CassandraMappingContext
Returns the configuredMappingContext
containing mapping meta-data (persistent entities and properties) used to store (map) objects to Cassandra tables (rows/columns).
-
Constructor Details
-
QueryMapper
Creates a newQueryMapper
with the givenCassandraConverter
.- Parameters:
converter
- must not be null.
-
-
Method Details
-
getConverter
Returns the configuredCassandraConverter
used to convert object values into Cassandra column typed values.- Returns:
- the configured
CassandraConverter
. - See Also:
-
getMappingContext
Returns the configuredMappingContext
containing mapping meta-data (persistent entities and properties) used to store (map) objects to Cassandra tables (rows/columns).- Returns:
- the configured
MappingContext
.
-
getMappedObject
Map aFilter
with atype hint
. Filter mapping translates property names to column names and mapsCriteriaDefinition.Predicate
values 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.Selector
s.
-
getMappedColumnNames
public List<com.datastax.oss.driver.api.core.CqlIdentifier> getMappedColumnNames(Columns columns, CassandraPersistentEntity<?> entity) MapColumns
with atype hint
to column names for included columns. Function call selectors or otherColumns.Selector
types are not included.- Parameters:
columns
- must not be null.entity
- must not be null.- Returns:
- the mapped column names.
-
getMappedSort
-