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.
-
Field Summary
Modifier and TypeFieldDescriptionprotected UnconstrainedDataManager
UnconstrainedDataManager
orDataManager
will be chosen depending onApplyConstraints
annotation on method/repository or ancestor method/repositoryprotected final org.springframework.data.projection.ProjectionFactory
protected final String
protected int
protected FetchPlanRepository
protected int
protected Metadata
protected final org.springframework.data.repository.core.RepositoryMetadata
protected final Method
protected int
protected final Map<String,
Serializable> protected final JmixQueryMethod
protected List<QueryStringProcessor>
protected int
-
Constructor Summary
ConstructorDescriptionJmixAbstractQuery
(DataManager dataManager, Metadata jmixMetadata, FetchPlanRepository fetchPlanRepository, List<QueryStringProcessor> queryStringProcessors, Method method, org.springframework.data.repository.core.RepositoryMetadata metadata, org.springframework.data.projection.ProjectionFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionbuildNamedParametersMap
(Object[] values) protected Map<String,
Serializable> collectHints
(Object[] parameters) protected static String
formatMethod
(Method method) protected String
protected List<Sort.Order>
getSortFromParams
(Object[] parameters) protected abstract LoadContext<?>
prepareQueryContext
(Object[] parameters) protected Object
processAccordingToReturnType
(LoadContext<?> loadContext, Object[] parameters) protected void
protected void
setupFetchPlan
(LoadContext<?> loadContext, Object[] parameters) toString()
-
Field Details
-
method
-
metadata
protected final org.springframework.data.repository.core.RepositoryMetadata metadata -
factory
protected final org.springframework.data.projection.ProjectionFactory factory -
queryMethod
-
dataManager
UnconstrainedDataManager
orDataManager
will be chosen depending onApplyConstraints
annotation on method/repository or ancestor method/repository -
queryStringProcessors
-
fetchPlanRepository
-
jmixMetadata
-
namedParametersBindings
-
sortIndex
protected int sortIndex -
pageableIndex
protected int pageableIndex -
fetchPlanIndex
protected int fetchPlanIndex -
jmixContextIndex
protected int jmixContextIndex -
queryHints
-
fetchPlanByAnnotation
-
-
Constructor Details
-
JmixAbstractQuery
public JmixAbstractQuery(DataManager dataManager, Metadata jmixMetadata, FetchPlanRepository fetchPlanRepository, List<QueryStringProcessor> queryStringProcessors, Method method, org.springframework.data.repository.core.RepositoryMetadata metadata, org.springframework.data.projection.ProjectionFactory factory)
-
-
Method Details
-
getQueryMethod
- Specified by:
getQueryMethod
in interfaceorg.springframework.data.repository.query.RepositoryQuery
-
getDataManager
-
buildNamedParametersMap
-
processSpecialParameters
protected void processSpecialParameters() -
setupFetchPlan
-
getSortFromParams
-
collectHints
-
execute
- Specified by:
execute
in interfaceorg.springframework.data.repository.query.RepositoryQuery
-
prepareQueryContext
-
processAccordingToReturnType
@Nullable protected Object processAccordingToReturnType(LoadContext<?> loadContext, Object[] parameters) -
formatMethod
-
toString
-
getQueryDescription
-