Class JmixAbstractQuery

java.lang.Object
io.jmix.core.impl.repository.query.JmixAbstractQuery
All Implemented Interfaces:
org.springframework.data.repository.query.RepositoryQuery
Direct Known Subclasses:
JmixCustomLoadQuery, JmixStructuredQuery

public abstract class JmixAbstractQuery extends Object implements org.springframework.data.repository.query.RepositoryQuery
Query implementation for Jmix. If you need different types of queries, you can either extend this class or implement parent interface.
See Also:
  • Field Details

    • method

      protected final Method method
    • metadata

      protected final org.springframework.data.repository.core.RepositoryMetadata metadata
    • factory

      protected final org.springframework.data.projection.ProjectionFactory factory
    • queryMethod

      protected final JmixQueryMethod queryMethod
    • dataManager

      protected UnconstrainedDataManager dataManager
      UnconstrainedDataManager or DataManager will be chosen depending on ApplyConstraints annotation on method/repository or ancestor method/repository
    • queryStringProcessors

      protected List<QueryStringProcessor> queryStringProcessors
    • fetchPlanRepository

      protected FetchPlanRepository fetchPlanRepository
    • jmixMetadata

      protected Metadata jmixMetadata
    • namedParametersBindings

      protected final Map<String,Integer> namedParametersBindings
    • sortIndex

      protected int sortIndex
    • pageableIndex

      protected int pageableIndex
    • fetchPlanIndex

      protected int fetchPlanIndex
    • jmixContextIndex

      protected int jmixContextIndex
    • queryHints

      protected final Map<String,Serializable> queryHints
    • fetchPlanByAnnotation

      protected final String fetchPlanByAnnotation
  • Constructor Details

  • Method Details

    • getQueryMethod

      public JmixQueryMethod getQueryMethod()
      Specified by:
      getQueryMethod in interface org.springframework.data.repository.query.RepositoryQuery
    • getDataManager

      public UnconstrainedDataManager getDataManager()
    • buildNamedParametersMap

      protected Map<String,Object> buildNamedParametersMap(Object[] values)
    • processSpecialParameters

      protected void processSpecialParameters()
    • setupFetchPlan

      protected void setupFetchPlan(LoadContext<?> loadContext, Object[] parameters)
    • getSortFromParams

      protected List<Sort.Order> getSortFromParams(Object[] parameters)
    • collectHints

      protected Map<String,Serializable> collectHints(Object[] parameters)
    • execute

      public Object execute(Object[] parameters)
      Specified by:
      execute in interface org.springframework.data.repository.query.RepositoryQuery
    • prepareQueryContext

      protected abstract LoadContext<?> prepareQueryContext(Object[] parameters)
    • processAccordingToReturnType

      @Nullable protected Object processAccordingToReturnType(LoadContext<?> loadContext, Object[] parameters)
    • formatMethod

      protected static String formatMethod(Method method)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getQueryDescription

      protected String getQueryDescription()