public class HQLQuery extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
aliasCounter |
protected boolean |
distinctRequired |
protected StringBuilder |
from |
protected int |
maxResults |
protected StringBuilder |
orderBy |
protected boolean |
orderByRequired |
protected List<Object> |
parameterValues |
protected Function<List<Object[]>,List<?>> |
resultTransform |
protected StringBuilder |
select |
protected int |
startIndex |
protected StringBuilder |
where |
protected boolean |
whereRequired |
Constructor and Description |
---|
HQLQuery() |
Modifier and Type | Method and Description |
---|---|
String |
addParameterPlaceholder(Object value)
Creates a variable placeholder for a parameter
|
StringBuilder |
appendFrom(CharSequence hql) |
StringBuilder |
appendOrderBy(CharSequence hql) |
StringBuilder |
appendSelect(CharSequence hql) |
StringBuilder |
appendWhere(CharSequence hql)
Deprecated.
use safeAppendWhere instead
|
int |
getMaxResults() |
int |
getNextAlias() |
List<Object> |
getParameterValues() |
Function<List<Object[]>,List<?>> |
getResultTransform() |
int |
getStartIndex() |
void |
limitResults(int maxResults) |
void |
offsetResults(int startIndex) |
void |
requireDistinct() |
HQLQuery |
safeAppendWhere(CharSequence hql) |
void |
setResultTransform(Function<List<Object[]>,List<?>> resultTransform) |
String |
toString() |
protected final StringBuilder select
protected final StringBuilder from
protected final StringBuilder where
protected final StringBuilder orderBy
protected int aliasCounter
protected boolean distinctRequired
protected boolean whereRequired
protected boolean orderByRequired
protected int maxResults
protected int startIndex
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 List<Object> getParameterValues()
null
elements for parameters that are
to be ignoredpublic void requireDistinct()
public void limitResults(int maxResults)
public void offsetResults(int startIndex)
public int getMaxResults()
public int getStartIndex()
Copyright © 2019 Atlassian. All rights reserved.