public static class LoadContext.Query extends java.lang.Object implements DataLoadContextQuery, java.io.Serializable
Modifier | Constructor and Description |
---|---|
protected |
Query() |
|
Query(java.lang.String queryString) |
Modifier and Type | Method and Description |
---|---|
LoadContext.Query |
copy()
Creates a copy of this Query instance.
|
void |
copyStateTo(LoadContext.Query query) |
boolean |
equals(java.lang.Object o) |
Condition |
getCondition() |
int |
getFirstResult() |
int |
getMaxResults() |
java.util.Map<java.lang.String,java.lang.Object> |
getParameters() |
java.lang.String |
getQueryString() |
Sort |
getSort() |
int |
hashCode() |
boolean |
isCacheable() |
LoadContext.Query |
setCacheable(boolean cacheable)
Indicates that the query results should be cached.
|
LoadContext.Query |
setCondition(Condition condition) |
LoadContext.Query |
setFirstResult(int firstResult) |
LoadContext.Query |
setMaxResults(int maxResults) |
LoadContext.Query |
setParameter(java.lang.String name,
java.util.Date value,
javax.persistence.TemporalType temporalType)
Set value for a parameter of java.util.Date type.
|
LoadContext.Query |
setParameter(java.lang.String name,
java.lang.Object value)
Set value for a query parameter.
|
LoadContext.Query |
setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters) |
LoadContext.Query |
setQueryString(java.lang.String queryString) |
LoadContext.Query |
setSort(Sort sort) |
java.lang.String |
toString() |
protected Query()
public Query(java.lang.String queryString)
queryString
- JPQL query string. Only named parameters are supported.public java.lang.String getQueryString()
public LoadContext.Query setQueryString(java.lang.String queryString)
queryString
- JPQL query string. Only named parameters are supported.public LoadContext.Query setParameter(java.lang.String name, java.lang.Object value)
setParameter
in interface DataLoadContextQuery
name
- parameter namevalue
- parameter valuepublic LoadContext.Query setParameter(java.lang.String name, java.util.Date value, javax.persistence.TemporalType temporalType)
setParameter
in interface DataLoadContextQuery
name
- parameter namevalue
- date valuetemporalType
- temporal typepublic java.util.Map<java.lang.String,java.lang.Object> getParameters()
getParameters
in interface DataLoadContextQuery
public LoadContext.Query setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
setParameters
in interface DataLoadContextQuery
parameters
- map of the query parameterspublic LoadContext.Query setFirstResult(int firstResult)
setFirstResult
in interface DataLoadContextQuery
firstResult
- results offsetpublic LoadContext.Query setMaxResults(int maxResults)
setMaxResults
in interface DataLoadContextQuery
maxResults
- results limitpublic Condition getCondition()
getCondition
in interface DataLoadContextQuery
public LoadContext.Query setCondition(Condition condition)
setCondition
in interface DataLoadContextQuery
condition
- root query conditionpublic Sort getSort()
public LoadContext.Query setSort(Sort sort)
sort
- query sortpublic LoadContext.Query setCacheable(boolean cacheable)
public int getFirstResult()
getFirstResult
in interface DataLoadContextQuery
public int getMaxResults()
getMaxResults
in interface DataLoadContextQuery
public boolean isCacheable()
public LoadContext.Query copy()
public void copyStateTo(LoadContext.Query query)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object