Class JpqlQueryBuilder<Q extends JmixQuery>

java.lang.Object
io.jmix.data.impl.JpqlQueryBuilder<Q>

@Component("data_JpqlQueryBuilder") @Scope("prototype") public class JpqlQueryBuilder<Q extends JmixQuery> extends Object
Builds Query instance to use in DataService.
  • Field Details

    • id

      protected Object id
    • ids

      protected List<?> ids
    • queryString

      protected String queryString
    • queryParameters

      protected Map<String,Object> queryParameters
    • condition

      protected Condition condition
    • sort

      protected Sort sort
    • entityName

      protected String entityName
    • valueProperties

      protected List<String> valueProperties
    • previousResults

      protected boolean previousResults
    • sessionId

      protected UUID sessionId
    • queryKey

      protected int queryKey
    • countQuery

      protected boolean countQuery
    • lockMode

      protected javax.persistence.LockModeType lockMode
    • resultQuery

      protected String resultQuery
    • resultParameters

      protected Map<String,Object> resultParameters
    • metadata

      @Autowired protected Metadata metadata
    • conditionJpqlGenerator

      @Autowired protected ConditionJpqlGenerator conditionJpqlGenerator
    • conditionParameterJpqlGenerator

      @Autowired protected ParameterJpqlGenerator conditionParameterJpqlGenerator
    • sortJpqlGenerator

      @Autowired protected SortJpqlGenerator sortJpqlGenerator
    • queryTransformerFactory

      @Autowired protected QueryTransformerFactory queryTransformerFactory
    • metadataTools

      @Autowired protected MetadataTools metadataTools
    • beanFactory

      @Autowired protected org.springframework.beans.factory.BeanFactory beanFactory
    • queryParamValuesManager

      @Autowired protected QueryParamValuesManager queryParamValuesManager
  • Constructor Details

    • JpqlQueryBuilder

      public JpqlQueryBuilder()
  • Method Details

    • setId

      public JpqlQueryBuilder setId(@Nullable Object id)
    • setIds

      public JpqlQueryBuilder setIds(List<?> ids)
    • setEntityName

      public JpqlQueryBuilder setEntityName(String entityName)
    • setValueProperties

      public JpqlQueryBuilder setValueProperties(List<String> valueProperties)
    • setQueryString

      public JpqlQueryBuilder setQueryString(String queryString)
    • setQueryParameters

      public JpqlQueryBuilder setQueryParameters(Map<String,Object> queryParams)
    • setCondition

      public JpqlQueryBuilder setCondition(Condition condition)
    • setSort

      public JpqlQueryBuilder setSort(Sort sort)
    • setPreviousResults

      public JpqlQueryBuilder setPreviousResults(UUID sessionId, int queryKey)
    • setCountQuery

      public JpqlQueryBuilder setCountQuery()
    • setLockMode

      public JpqlQueryBuilder setLockMode(@Nullable javax.persistence.LockModeType lockMode)
    • getResultQueryString

      public String getResultQueryString()
    • getResultParameters

      public Map<String,Object> getResultParameters()
    • getQuery

      public Q getQuery(javax.persistence.EntityManager em)
    • buildResultQuery

      protected void buildResultQuery()
    • applySorting

      protected void applySorting()
    • applyFiltering

      protected void applyFiltering()
    • createConditionGenerationContext

      protected ConditionGenerationContext createConditionGenerationContext(@Nullable Condition condition)
    • applyCount

      protected void applyCount()
    • restrictByPreviousResults

      protected void restrictByPreviousResults()
    • replaceParamsInMacros

      protected void replaceParamsInMacros(Q query)
    • getPrimaryKeyProperty

      protected MetaProperty getPrimaryKeyProperty()
    • printQuery

      @Nullable public static String printQuery(@Nullable String query)