public class QCriteriaQueryBase<T> extends QRestrictor<T>
| Modifier | Constructor and Description |
|---|---|
protected |
QCriteriaQueryBase(Class<T> clz) |
protected |
QCriteriaQueryBase(ICriteriaTableDef<T> meta) |
| Modifier and Type | Method and Description |
|---|---|
QCriteriaQueryBase<T> |
add(QOrder r)
Add an order clause to the list of sort items.
|
protected void |
addColumn(QSelectionItem item,
String alias)
Add a column selector to the selection list.
|
protected void |
addPropertySelection(QSelectionFunction f,
String prop,
String alias)
Add a simple property selector to the list.
|
QCriteriaQueryBase<T> |
ascending(String property)
Add a property to do an ascending sort on.
|
protected QCriteriaQueryBase<T> |
avg(String property)
Select the average value of a property in the set.
|
protected QCriteriaQueryBase<T> |
avg(String property,
String alias)
Select the average value of a property in the set.
|
protected QCriteriaQueryBase<T> |
count(String property)
Select a count over the result set.
|
protected QCriteriaQueryBase<T> |
count(String property,
String alias)
Select a count over the result set.
|
protected QCriteriaQueryBase<T> |
countDistinct(String property)
Select a count of the distinct values over the result set.
|
protected QCriteriaQueryBase<T> |
countDistinct(String property,
String alias)
Select a count of the distinct values over the result set.
|
QCriteriaQueryBase<T> |
descending(String property)
Add a property to do a descending sort on.
|
protected QCriteriaQueryBase<T> |
distinct(String property)
Select of the distinct values over the result set.
|
protected QCriteriaQueryBase<T> |
distinct(String property,
String alias)
Select of the distinct values over the result set.
|
QCriteriaQueryBase<T> |
fetch(String property,
QFetchStrategy strategy)
Set a fetch strategy for a relation.
|
List<QSelectionColumn> |
getColumnList()
Returns all selected columns.
|
Map<String,QFetchStrategy> |
getFetchStrategies() |
int |
getLimit()
Returns the limit.
|
Object |
getOption(String name)
Get the value stored for a given option.
|
List<QOrder> |
getOrder()
Returns the order-by list.
|
QOperatorNode |
getRestrictions() |
int |
getStart()
Returns the start index set.
|
String |
getTestId() |
int |
getTimeout() |
boolean |
hasOption(String name)
Returns T if the specified option is present.
|
QCriteriaQueryBase<T> |
limit(int limit)
Limit the #of rows to the specified count.
|
protected QCriteriaQueryBase<T> |
max(String property)
Select the max of a property in the set.
|
protected QCriteriaQueryBase<T> |
max(String property,
String alias)
Select the max of a property in the set.
|
protected QCriteriaQueryBase<T> |
min(String property)
Select the minimal value of a property in the set.
|
protected QCriteriaQueryBase<T> |
min(String property,
String alias)
Select the minimal value of a property in the set.
|
protected QCriteriaQueryBase<T> |
selectProperty(String property)
Select a property value from the base property in the result set.
|
protected QCriteriaQueryBase<T> |
selectProperty(String property,
String alias)
Select a property value from the base property in the result set.
|
void |
setOption(String name,
Object val)
Set an option for the query or some of it's listeners.
|
void |
setRestrictions(QOperatorNode restrictions) |
void |
setTestId(String testId) |
void |
setTimeout(int timeout)
Set the query timeout, in seconds.
|
QCriteriaQueryBase<T> |
start(int start)
Start returning rows at the specified index in the result set (0-based).
|
protected QCriteriaQueryBase<T> |
sum(String property)
Select the sum of a property in the set.
|
protected QCriteriaQueryBase<T> |
sum(String property,
String alias)
Select the sum of a property in the set.
|
add, and, between, eq, eq, eq, eq, eq, exists, exists, ge, ge, ge, getBaseClass, getMetaTable, getReturnClass, getUnusedSubquerySet, gt, gt, gt, hasRestrictions, ilike, in, in, in, internalAdd, internalUseQuery, isnotnull, isnull, le, le, le, like, lt, lt, lt, mergeCriteria, ne, ne, ne, ne, not, or, or, sqlCondition, sqlCondition, subqueryprotected QCriteriaQueryBase(@Nonnull ICriteriaTableDef<T> meta)
@Nullable public QOperatorNode getRestrictions()
getRestrictions in class QRestrictor<T>public void setRestrictions(@Nullable QOperatorNode restrictions)
setRestrictions in class QRestrictor<T>@Nonnull public List<QSelectionColumn> getColumnList()
public void setOption(@Nonnull String name, @Nullable Object val)
name - val - public boolean hasOption(@Nonnull String name)
name - @Nullable public Object getOption(@Nonnull String name)
name - @Nonnull public Map<String,QFetchStrategy> getFetchStrategies()
protected void addColumn(@Nonnull QSelectionItem item, @Nullable String alias)
protected void addPropertySelection(@Nonnull QSelectionFunction f, @Nonnull String prop, @Nullable String alias)
f - prop - alias - @Nonnull protected QCriteriaQueryBase<T> selectProperty(@Nonnull String property)
property - The property whose literal value is to be selected@Nonnull protected QCriteriaQueryBase<T> selectProperty(@Nonnull String property, @Nullable String alias)
property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull protected QCriteriaQueryBase<T> max(@Nonnull String property)
property - The property whose literal value is to be selected@Nonnull protected QCriteriaQueryBase<T> max(@Nonnull String property, @Nullable String alias)
property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull protected QCriteriaQueryBase<T> min(@Nonnull String property)
property - The property whose literal value is to be selected@Nonnull protected QCriteriaQueryBase<T> min(@Nonnull String property, @Nullable String alias)
property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull protected QCriteriaQueryBase<T> avg(@Nonnull String property)
property - The property whose literal value is to be selected@Nonnull protected QCriteriaQueryBase<T> avg(@Nonnull String property, @Nullable String alias)
property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull protected QCriteriaQueryBase<T> sum(@Nonnull String property)
property - The property whose literal value is to be selected@Nonnull protected QCriteriaQueryBase<T> sum(@Nonnull String property, @Nullable String alias)
property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull protected QCriteriaQueryBase<T> count(@Nonnull String property)
property - The property whose literal value is to be selected@Nonnull protected QCriteriaQueryBase<T> count(@Nonnull String property, @Nullable String alias)
property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull protected QCriteriaQueryBase<T> countDistinct(@Nonnull String property)
property - The property whose literal value is to be selected@Nonnull protected QCriteriaQueryBase<T> countDistinct(@Nonnull String property, @Nullable String alias)
property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull protected QCriteriaQueryBase<T> distinct(@Nonnull String property)
property - The property whose literal value is to be selected@Nonnull protected QCriteriaQueryBase<T> distinct(@Nonnull String property, @Nullable String alias)
property - The property whose literal value is to be selected@Nonnull public QCriteriaQueryBase<T> add(@Nonnull QOrder r)
r - @Nonnull public QCriteriaQueryBase<T> ascending(@Nonnull String property)
property - @Nonnull public QCriteriaQueryBase<T> descending(@Nonnull String property)
property - @Nonnull public QCriteriaQueryBase<T> limit(int limit)
limit - @Nonnull public QCriteriaQueryBase<T> start(int start)
start - public final int getLimit()
public final int getStart()
public int getTimeout()
public void setTimeout(int timeout)
QQueryTimeoutException when the query is aborted because it ran too long. When unset the value defaults
to -1 which means "use the default timeout"; 0 means "no timeout at all"; all others is the timeout in seconds.timeout - @Nonnull public QCriteriaQueryBase<T> fetch(@Nonnull String property, @Nonnull QFetchStrategy strategy)
property - strategy - Copyright © 2017 etc.to. All rights reserved.