Class ItemSqlMapper

  • public class ItemSqlMapper
    extends Object
    Declarative information how an item (from schema/prism world) is to be processed when interpreting query. As this is declarative it does not point to any Q-class attributes - instead it knows how to get to the attributes when the Q-class instance (entity path) is provided; this is provided as a function (or functions for multiple paths), typically as lambdas. Based on this information the mapper can later create FilterProcessor when needed, again providing the right type of FilterProcessor, based on the type of the item and/or how the item is mapped to the database.
    • Method Detail

      • itemPrimaryPath

        public @Nullable com.querydsl.core.types.Path<?> itemPrimaryPath​(com.querydsl.core.types.EntityPath<?> root)
      • createFilterProcessor

        public <T extends ObjectFilterItemFilterProcessor<T> createFilterProcessor​(SqlQueryContext<?,​?,​?> sqlQueryContext)
        Creates ItemFilterProcessor based on this mapping. Provided SqlQueryContext is used to figure out the query paths when this is executed (as the entity path instance is not yet available when the mapping is configured in a declarative manner). The type of the returned filter is adapted to the client code needs for convenience.