public class QueryMapper extends Object
CriteriaDefinition and Sort objects considering mapping metadata and dialect-specific
conversion.| 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(R2dbcDialect dialect,
R2dbcConverter converter)
Creates a new
QueryMapper with the given R2dbcConverter. |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
convertValue(Object value,
TypeInformation<?> typeInformation) |
Parameter |
getBindValue(Parameter value)
Potentially convert the
Parameter. |
SettableValue |
getBindValue(SettableValue value)
Potentially convert the
SettableValue. |
BoundCondition |
getMappedObject(BindMarkers markers,
org.springframework.data.relational.core.query.CriteriaDefinition criteria,
org.springframework.data.relational.core.sql.Table table,
org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?> entity)
|
BoundCondition |
getMappedObject(BindMarkers markers,
Criteria criteria,
org.springframework.data.relational.core.sql.Table table,
org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?> entity)
Deprecated.
since 1.1.
|
org.springframework.data.relational.core.sql.Expression |
getMappedObject(org.springframework.data.relational.core.sql.Expression expression,
org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?> entity)
Map the
Expression object to apply field name mapping using the type to read. |
Sort |
getMappedObject(Sort sort,
org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?> entity)
Map the
Sort object to apply field name mapping using the type to read. |
List<org.springframework.data.relational.core.sql.OrderByField> |
getMappedSort(org.springframework.data.relational.core.sql.Table table,
Sort sort,
org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?> entity)
Map the
Sort object to apply field name mapping using the type to read. |
protected MappingContext<? extends org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>,org.springframework.data.relational.core.mapping.RelationalPersistentProperty> |
getMappingContext() |
String |
toSql(org.springframework.data.relational.core.sql.SqlIdentifier identifier)
Render a
SqlIdentifier for SQL usage. |
public QueryMapper(R2dbcDialect dialect, R2dbcConverter converter)
QueryMapper with the given R2dbcConverter.dialect - converter - must not be null.public String toSql(org.springframework.data.relational.core.sql.SqlIdentifier identifier)
SqlIdentifier for SQL usage.identifier - public Sort getMappedObject(Sort sort, @Nullable org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?> entity)
Sort object to apply field name mapping using the type to read.sort - must not be null.entity - related RelationalPersistentEntity, can be null.public List<org.springframework.data.relational.core.sql.OrderByField> getMappedSort(org.springframework.data.relational.core.sql.Table table, Sort sort, @Nullable org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?> entity)
Sort object to apply field name mapping using the type to read.sort - must not be null.entity - related RelationalPersistentEntity, can be null.public org.springframework.data.relational.core.sql.Expression getMappedObject(org.springframework.data.relational.core.sql.Expression expression,
@Nullable
org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?> entity)
Expression object to apply field name mapping using the type to read.expression - must not be null.entity - related RelationalPersistentEntity, can be null.Expression.public BoundCondition getMappedObject(BindMarkers markers, org.springframework.data.relational.core.query.CriteriaDefinition criteria, org.springframework.data.relational.core.sql.Table table, @Nullable org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?> entity)
markers - bind markers object, must not be null.criteria - criteria definition to map, must not be null.table - must not be null.entity - related RelationalPersistentEntity, can be null.BoundCondition.@Deprecated public BoundCondition getMappedObject(BindMarkers markers, Criteria criteria, org.springframework.data.relational.core.sql.Table table, @Nullable org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?> entity)
markers - bind markers object, must not be null.criteria - criteria definition to map, must not be null.table - must not be null.entity - related RelationalPersistentEntity, can be null.BoundCondition.public SettableValue getBindValue(SettableValue value)
SettableValue.value - public Parameter getBindValue(Parameter value)
Parameter.value - @Nullable protected Object convertValue(@Nullable Object value, TypeInformation<?> typeInformation)
protected MappingContext<? extends org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>,org.springframework.data.relational.core.mapping.RelationalPersistentProperty> getMappingContext()
Copyright © 2018–2020 Pivotal Software, Inc.. All rights reserved.