public class HQLQuery extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
aliasCounter |
protected String |
batchedParam |
protected String |
cacheRegion |
protected Comparator |
comparatorForBatch |
protected boolean |
distinctRequired |
protected StringBuilder |
from |
protected int |
maxResults |
protected StringBuilder |
orderBy |
protected boolean |
orderByRequired |
protected Map<String,Object> |
parameterValues |
protected boolean |
readOnly |
protected Function<List<Object[]>,List<?>> |
resultTransform |
protected StringBuilder |
select |
protected int |
startIndex |
protected StringBuilder |
where |
protected boolean |
whereRequired |
Constructor and Description |
---|
HQLQuery() |
protected final StringBuilder select
protected final StringBuilder from
protected final StringBuilder where
protected final StringBuilder orderBy
protected int aliasCounter
protected String cacheRegion
protected boolean distinctRequired
protected boolean whereRequired
protected boolean orderByRequired
protected boolean readOnly
protected int maxResults
protected int startIndex
protected String batchedParam
protected Comparator comparatorForBatch
public StringBuilder appendSelect(CharSequence hql)
public StringBuilder appendFrom(CharSequence hql)
@Deprecated public StringBuilder appendWhere(CharSequence hql)
hql
- the text to append to the where clausepublic HQLQuery safeAppendWhere(CharSequence hql)
public StringBuilder appendOrderBy(CharSequence hql)
public int getNextAlias()
public String addParameterPlaceholder(@Nullable Object value)
value
- actual value of the parameter, or null
if the parameter is to be ignoredpublic String addParameterPlaceholderForBatchedParam(@Nullable Collection values)
getBatchedParamName()
and getBatchedParamValues()
.
Only one parameter can be batched.values
- values of the parameter that need to be batchedpublic Comparator getComparatorForBatch()
public void setComparatorForBatch(Comparator comparatorForBatch)
public Map<String,Object> getParameterMap()
null
elements for parameters that are
to be ignoredpublic Collection<Object> getParameterValues()
public void requireDistinct()
public void limitResults(int maxResults)
public void offsetResults(int startIndex)
public int getMaxResults()
public int getStartIndex()
public boolean isReadOnly()
public void setReadOnly(boolean readOnly)
public String getBatchedParamName()
public Collection getBatchedParamValues()
public String getCacheRegion()
public void setCacheRegion(String cacheRegion)
Copyright © 2021 Atlassian. All rights reserved.