Package io.jmix.core
Class LoadContext.Query
java.lang.Object
io.jmix.core.LoadContext.Query
- All Implemented Interfaces:
- DataLoadContextQuery,- Serializable
- Enclosing class:
- LoadContext<E>
Class that defines a query to be executed for data loading.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncopy()Creates a copy of this Query instance.voidcopyStateTo(LoadContext.Query query) booleanintintgetSort()inthashCode()booleanbooleansetCacheable(boolean cacheable) Indicates that the query results should be cached.setCondition(Condition condition) voidsetDistinct(boolean distinct) Sets whether query result should contain only unique elements ('distinct' will be added to jpql query).setFirstResult(int firstResult) setMaxResults(int maxResults) setParameter(String name, Object value) Set value for a query parameter.setParameter(String name, Date value, jakarta.persistence.TemporalType temporalType) Set value for a parameter of java.util.Date type.setParameters(Map<String, Object> parameters) setQueryString(String queryString) toString()
- 
Constructor Details- 
Queryprotected Query()
- 
Query- Parameters:
- queryString- query string. Only named parameters are supported.
 
 
- 
- 
Method Details- 
getQueryString- Returns:
- query string
 
- 
setQueryString- Parameters:
- queryString- query string. Only named parameters are supported.
 
- 
setParameterSet value for a query parameter.- Specified by:
- setParameterin interface- DataLoadContextQuery
- Parameters:
- name- parameter name
- value- parameter value
- Returns:
- this query instance for chaining
 
- 
setParameterpublic LoadContext.Query setParameter(String name, Date value, jakarta.persistence.TemporalType temporalType) Set value for a parameter of java.util.Date type.- Specified by:
- setParameterin interface- DataLoadContextQuery
- Parameters:
- name- parameter name
- value- date value
- temporalType- temporal type
- Returns:
- this query instance for chaining
 
- 
getParameters- Specified by:
- getParametersin interface- DataLoadContextQuery
- Returns:
- editable map of the query parameters
 
- 
setParameters- Specified by:
- setParametersin interface- DataLoadContextQuery
- Parameters:
- parameters- map of the query parameters
 
- 
setFirstResult- Specified by:
- setFirstResultin interface- DataLoadContextQuery
- Parameters:
- firstResult- results offset
- Returns:
- this query instance for chaining
 
- 
setMaxResults- Specified by:
- setMaxResultsin interface- DataLoadContextQuery
- Parameters:
- maxResults- results limit
- Returns:
- this query instance for chaining
 
- 
getCondition- Specified by:
- getConditionin interface- DataLoadContextQuery
- Returns:
- root query condition
 
- 
setCondition- Specified by:
- setConditionin interface- DataLoadContextQuery
- Parameters:
- condition- root query condition
- Returns:
- this query instance for chaining
 
- 
getSort- Returns:
- query sort
 
- 
setSort- Parameters:
- sort- query sort
- Returns:
- this query instance for chaining
 
- 
setCacheableIndicates that the query results should be cached.- Returns:
- the same query instance
 
- 
getFirstResultpublic int getFirstResult()- Specified by:
- getFirstResultin interface- DataLoadContextQuery
- Returns:
- results offset
 
- 
getMaxResultspublic int getMaxResults()- Specified by:
- getMaxResultsin interface- DataLoadContextQuery
- Returns:
- results limit
 
- 
isCacheablepublic boolean isCacheable()
- 
isDistinctpublic boolean isDistinct()- Returns:
- true if query result should contain only unique elements ('distinct' will be added to jpql query), false otherwise
 
- 
setDistinctpublic void setDistinct(boolean distinct) Sets whether query result should contain only unique elements ('distinct' will be added to jpql query).- Parameters:
- distinct- flag indicating whether query result should contain only unique elements
 
- 
copyCreates a copy of this Query instance.
- 
copyStateTo
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-