Class JmixStructuredQuery
java.lang.Object
io.jmix.core.impl.repository.query.JmixAbstractQuery
io.jmix.core.impl.repository.query.JmixStructuredQuery
- All Implemented Interfaces:
org.springframework.data.repository.query.RepositoryQuery
- Direct Known Subclasses:
JmixCountQuery
,JmixListQuery
Base
RepositoryQuery
class for repository queries constructed by method name.-
Field Summary
Modifier and TypeFieldDescriptionprotected final Condition
protected final boolean
protected final Integer
Ignored if PageRequest parameter passed with its own max results.Fields inherited from class io.jmix.core.impl.repository.query.JmixAbstractQuery
dataManager, factory, fetchPlanByAnnotation, fetchPlanIndex, fetchPlanRepository, jmixContextIndex, jmixMetadata, metadata, method, namedParametersBindings, pageableIndex, queryHints, queryMethod, queryStringProcessors, sortIndex
-
Constructor Summary
ConstructorDescriptionJmixStructuredQuery
(DataManager dataManager, Metadata jmixMetadata, FetchPlanRepository fetchPlanRepository, List<QueryStringProcessor> queryStringProcessors, Method method, org.springframework.data.repository.core.RepositoryMetadata metadata, org.springframework.data.projection.ProjectionFactory factory, org.springframework.data.repository.query.parser.PartTree qryTree) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected LoadContext<?>
prepareQueryContext
(Object[] parameters) BuildsLoadContext
based on derived method name,JmixDataRepositoryContext.condition()
,QueryHints
,JmixDataRepositoryContext.hints()
.Methods inherited from class io.jmix.core.impl.repository.query.JmixAbstractQuery
buildNamedParametersMap, collectHints, execute, formatMethod, getDataManager, getQueryMethod, getSortFromParams, processAccordingToReturnType, processSpecialParameters, setupFetchPlan, toString
-
Field Details
-
conditions
-
distinct
protected final boolean distinct -
maxResults
Ignored if PageRequest parameter passed with its own max results.
-
-
Constructor Details
-
JmixStructuredQuery
public JmixStructuredQuery(DataManager dataManager, Metadata jmixMetadata, FetchPlanRepository fetchPlanRepository, List<QueryStringProcessor> queryStringProcessors, Method method, org.springframework.data.repository.core.RepositoryMetadata metadata, org.springframework.data.projection.ProjectionFactory factory, org.springframework.data.repository.query.parser.PartTree qryTree)
-
-
Method Details
-
getQueryDescription
- Overrides:
getQueryDescription
in classJmixAbstractQuery
-
prepareQueryContext
BuildsLoadContext
based on- derived method name,
JmixDataRepositoryContext.condition()
,QueryHints
,JmixDataRepositoryContext.hints()
.
Suitable as is for count query.
- Specified by:
prepareQueryContext
in classJmixAbstractQuery
- Parameters:
parameters
- query method parameters- Returns:
LoadContext
withLoadContext.getQuery()
not null
-