Class JmixAbstractQuery<T extends DataLoadContext>

java.lang.Object
io.jmix.core.impl.repository.query.JmixAbstractQuery<T>
All Implemented Interfaces:
org.springframework.data.repository.query.RepositoryQuery
Direct Known Subclasses:
JmixAbstractEntityQuery, JmixScalarQuery

public abstract class JmixAbstractQuery<T extends DataLoadContext> 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
    • jmixMetadata

      protected Metadata jmixMetadata
    • namedParametersBindings

      protected final Map<String,Integer> namedParametersBindings
    • sortIndex

      protected int sortIndex
    • pageableIndex

      protected int pageableIndex
    • jmixContextIndex

      protected int jmixContextIndex
    • queryHints

      protected final Map<String,Serializable> queryHints
  • Constructor Details

    • JmixAbstractQuery

      protected JmixAbstractQuery(DataManager dataManager, Metadata jmixMetadata, Method method, org.springframework.data.repository.core.RepositoryMetadata metadata, org.springframework.data.projection.ProjectionFactory factory)
  • 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()
    • getSortFromParams

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

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

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

      protected abstract T prepareQueryContext(Object[] parameters)
    • processAccordingToReturnType

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

      public static String formatMethod(Method method)
    • toString

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

      protected String getQueryDescription()