public class QueryMapper extends Object
Query to CQL-specific data types.ColumnName,
Columns,
Criteria,
Filter,
Sort| Modifier and Type | Class and Description |
|---|---|
protected static class |
QueryMapper.Field
Value object to represent a field and its meta-information.
|
protected static class |
QueryMapper.MetadataBackedField
Extension of
QueryMapper.Field to be backed with mapping metadata. |
| Constructor and Description |
|---|
QueryMapper(CassandraConverter converter)
Creates a new
QueryMapper with the given CassandraConverter. |
| Modifier and Type | Method and Description |
|---|---|
protected CassandraConverter |
getConverter()
Returns the configured
CassandraConverter used to convert object values into Cassandra column typed values. |
List<String> |
getMappedColumnNames(Columns columns,
CassandraPersistentEntity<?> entity)
|
Filter |
getMappedObject(Filter filter,
CassandraPersistentEntity<?> entity)
|
List<Columns.Selector> |
getMappedSelectors(Columns columns,
CassandraPersistentEntity<?> entity)
|
Sort |
getMappedSort(Sort sort,
CassandraPersistentEntity<?> entity) |
protected CassandraMappingContext |
getMappingContext()
Returns the configured
MappingContext containing mapping meta-data (persistent entities and properties)
used to store (map) objects to Cassandra tables (rows/columns). |
public QueryMapper(CassandraConverter converter)
QueryMapper with the given CassandraConverter.converter - must not be null.protected CassandraConverter getConverter()
CassandraConverter used to convert object values into Cassandra column typed values.CassandraConverter.CassandraConverterprotected CassandraMappingContext getMappingContext()
MappingContext containing mapping meta-data (persistent entities and properties)
used to store (map) objects to Cassandra tables (rows/columns).MappingContext.public Filter getMappedObject(Filter filter, CassandraPersistentEntity<?> entity)
Filter with a type hint. Filter mapping translates property names
to column names and maps CriteriaDefinition.Predicate values to simple Cassandra values.filter - must not be null.entity - must not be null.Filter.public List<Columns.Selector> getMappedSelectors(Columns columns, CassandraPersistentEntity<?> entity)
columns - must not be null.entity - must not be null.Columns.Selectors.public List<String> getMappedColumnNames(Columns columns, CassandraPersistentEntity<?> entity)
Columns with a type hint to column names for included columns.
Function call selectors or other Columns.Selector types are
not included.columns - must not be null.entity - must not be null.public Sort getMappedSort(Sort sort, CassandraPersistentEntity<?> entity)
Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.