java.lang.Object
org.springframework.data.jdbc.core.convert.QueryMapper

public class QueryMapper extends Object
Maps CriteriaDefinition and Sort objects considering mapping metadata and dialect-specific conversion.
Since:
3.0
Author:
Mark Paluch, Jens Schauder, Yan Qiang
  • Constructor Details

  • Method Details

    • getMappedSort

      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)
      Map the Sort object to apply field name mapping using the type to read.
      Parameters:
      sort - must not be null.
      entity - related RelationalPersistentEntity, can be null.
      Returns:
      a List of OrderByField objects guaranteed to be not null.
    • getMappedObject

      public org.springframework.data.relational.core.sql.Condition getMappedObject(MapSqlParameterSource parameterSource, 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)
      Map a CriteriaDefinition object into Condition and consider value/NULL bindings.
      Parameters:
      parameterSource - bind parameterSource 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.
      Returns:
      the mapped Condition.
    • convertValue

      @Nullable protected Object convertValue(@Nullable Object value, TypeInformation<?> typeInformation)
    • getMappingContext

      protected MappingContext<? extends org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>,org.springframework.data.relational.core.mapping.RelationalPersistentProperty> getMappingContext()