public class QSelection<T> extends QCriteriaQueryBase<T>
Even though this type has a generic type parameter representing the base object being queried, the list() method for this object will return a List
QSelection queries return an array of items for each row, and each element of the array is typed depending on it's source. In addition, QSelection queries expose the ability to handle grouping. QSelection criteria behave as and should be seen as SQL queries in an OO wrapping.
| Modifier | Constructor and Description |
|---|---|
protected |
QSelection(Class<T> clz) |
| Modifier and Type | Method and Description |
|---|---|
QSelection<T> |
add(QOperatorNode r) |
QSelection<T> |
add(QOrder r)
Add an order clause to the list of sort items.
|
void |
addColumn(QSelectionItem item,
String alias)
Add a column selector to the selection list.
|
void |
addPropertySelection(QSelectionFunction f,
String prop,
String alias)
Add a simple property selector to the list.
|
QSelection<T> |
ascending(String property)
Add a property to do an ascending sort on.
|
QSelection<T> |
avg(String property)
Select the average value of a property in the set.
|
QSelection<T> |
avg(String property,
String alias)
Select the average value of a property in the set.
|
QSelection<T> |
between(String property,
Object a,
Object b)
Compare the value of a property with two literal bounds.
|
QSelection<T> |
count(String property)
Select a count over the result set.
|
QSelection<T> |
count(String property,
String alias)
Select a count over the result set.
|
QSelection<T> |
countDistinct(String property)
Select a count of the distinct values over the result set.
|
QSelection<T> |
countDistinct(String property,
String alias)
Select a count of the distinct values over the result set.
|
static <T> QSelection<T> |
create(Class<T> root)
Create a selection query based on the specified persistent class (public API).
|
QSelection<T> |
descending(String property)
Add a property to do a descending sort on.
|
QSelection<T> |
distinct(String property)
Select of the distinct values over the result set.
|
QSelection<T> |
distinct(String property,
String alias)
Select of the distinct values over the result set.
|
QSelection<T> |
eq(String property,
double value)
Compare a property with some literal object value.
|
QSelection<T> |
eq(String property,
long value)
Compare a property with some literal object value.
|
QSelection<T> |
eq(String property,
Object value)
Compare a property with some literal object value.
|
QSelection<T> |
fetch(String property) |
QSelection<T> |
fetch(String property,
QFetchStrategy strategy)
Set a fetch strategy for a relation.
|
QSelection<T> |
ge(String property,
double value)
Compare a property with some literal object value.
|
QSelection<T> |
ge(String property,
long value)
Compare a property with some literal object value.
|
QSelection<T> |
ge(String property,
Object value)
Compare a property with some literal object value.
|
QSelection<T> |
gt(String property,
double value)
Compare a property with some literal object value.
|
QSelection<T> |
gt(String property,
long value)
Compare a property with some literal object value.
|
QSelection<T> |
gt(String property,
Object value)
Compare a property with some literal object value.
|
QSelection<T> |
ilike(String property,
Object value)
Do a case-independent 'like' comparison.
|
QSelection<T> |
isnotnull(String property)
Add the restriction that the property specified must be not-null.
|
QSelection<T> |
isnull(String property)
Add the restriction that the property specified must be null.
|
QSelection<T> |
le(String property,
double value)
Compare a property with some literal object value.
|
QSelection<T> |
le(String property,
long value)
Compare a property with some literal object value.
|
QSelection<T> |
le(String property,
Object value)
Compare a property with some literal object value.
|
QSelection<T> |
like(String property,
Object value)
Do a 'like' comparison.
|
QSelection<T> |
lt(String property,
double value)
Compare a property with some literal object value.
|
QSelection<T> |
lt(String property,
long value)
Compare a property with some literal object value.
|
QSelection<T> |
lt(String property,
Object value)
Compare a property with some literal object value.
|
QSelection<T> |
max(String property)
Select the max of a property in the set.
|
QSelection<T> |
max(String property,
String alias)
Select the max of a property in the set.
|
QSelection<T> |
min(String property)
Select the minimal value of a property in the set.
|
QSelection<T> |
min(String property,
String alias)
Select the minimal value of a property in the set.
|
QSelection<T> |
ne(String property,
double value)
Compare a property with some literal object value.
|
QSelection<T> |
ne(String property,
long value)
Compare a property with some literal object value.
|
QSelection<T> |
ne(String property,
Object value)
Compare a property with some literal object value.
|
QSelection<T> |
or(QOperatorNode a1,
QOperatorNode a2,
QOperatorNode... a)
Deprecated.
|
QSelection<T> |
selectProperty(String property)
Select a property value from the base property in the result set.
|
QSelection<T> |
selectProperty(String property,
String alias)
Select a property value from the base property in the result set.
|
QSelection<T> |
sqlCondition(String sql)
Add a restriction specified in bare SQL.
|
QSelection<T> |
sum(String property)
Select the sum of a property in the set.
|
QSelection<T> |
sum(String property,
String alias)
Select the sum of a property in the set.
|
QSelection<T> |
testId(String testId) |
String |
toString() |
void |
visit(QNodeVisitor v) |
getColumnList, getFetchStrategies, getLimit, getOption, getOrder, getRestrictions, getStart, getTestId, getTimeout, hasOption, limit, setOption, setRestrictions, setTestId, setTimeout, startand, eq, eq, exists, exists, getBaseClass, getMetaTable, getReturnClass, getUnusedSubquerySet, hasRestrictions, in, in, in, internalAdd, internalUseQuery, mergeCriteria, ne, not, or, sqlCondition, subquerypublic static <T> QSelection<T> create(Class<T> root)
T - The base type being queriedroot - The class representing the base type being queried, thanks to the brilliant Java Generics implementation.public void visit(QNodeVisitor v) throws Exception
Exceptionpublic void addColumn(@Nonnull QSelectionItem item, @Nullable String alias)
addColumn in class QCriteriaQueryBase<T>public void addPropertySelection(@Nonnull QSelectionFunction f, @Nonnull String prop, @Nullable String alias)
addPropertySelection in class QCriteriaQueryBase<T>@Nonnull public QSelection<T> avg(@Nonnull String property, @Nullable String alias)
avg in class QCriteriaQueryBase<T>property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull public QSelection<T> avg(@Nonnull String property)
avg in class QCriteriaQueryBase<T>property - The property whose literal value is to be selected@Nonnull public QSelection<T> count(@Nonnull String property, @Nullable String alias)
count in class QCriteriaQueryBase<T>property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull public QSelection<T> count(@Nonnull String property)
count in class QCriteriaQueryBase<T>property - The property whose literal value is to be selected@Nonnull public QSelection<T> countDistinct(@Nonnull String property, @Nullable String alias)
countDistinct in class QCriteriaQueryBase<T>property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull public QSelection<T> countDistinct(@Nonnull String property)
countDistinct in class QCriteriaQueryBase<T>property - The property whose literal value is to be selected@Nonnull public QSelection<T> distinct(@Nonnull String property, @Nullable String alias)
distinct in class QCriteriaQueryBase<T>property - The property whose literal value is to be selected@Nonnull public QSelection<T> distinct(@Nonnull String property)
distinct in class QCriteriaQueryBase<T>property - The property whose literal value is to be selected@Nonnull public QSelection<T> max(@Nonnull String property, @Nullable String alias)
max in class QCriteriaQueryBase<T>property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull public QSelection<T> max(@Nonnull String property)
max in class QCriteriaQueryBase<T>property - The property whose literal value is to be selected@Nonnull public QSelection<T> min(@Nonnull String property, @Nullable String alias)
min in class QCriteriaQueryBase<T>property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull public QSelection<T> min(@Nonnull String property)
min in class QCriteriaQueryBase<T>property - The property whose literal value is to be selected@Nonnull public QSelection<T> selectProperty(@Nonnull String property, @Nullable String alias)
selectProperty in class QCriteriaQueryBase<T>property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull public QSelection<T> selectProperty(@Nonnull String property)
selectProperty in class QCriteriaQueryBase<T>property - The property whose literal value is to be selected@Nonnull public QSelection<T> sum(@Nonnull String property, @Nullable String alias)
sum in class QCriteriaQueryBase<T>property - The property whose literal value is to be selectedalias - The alias for using the property in the restrictions clause.@Nonnull public QSelection<T> sum(@Nonnull String property)
sum in class QCriteriaQueryBase<T>property - The property whose literal value is to be selected@Nonnull public QSelection<T> add(@Nonnull QOperatorNode r)
add in class QRestrictor<T>QRestrictor.add(to.etc.webapp.query.QOperatorNode)@Nonnull public QSelection<T> add(@Nonnull QOrder r)
add in class QCriteriaQueryBase<T>QCriteriaQueryBase.add(to.etc.webapp.query.QOrder)@Nonnull public QSelection<T> ascending(@Nonnull String property)
ascending in class QCriteriaQueryBase<T>QCriteriaQueryBase.ascending(java.lang.String)@Nonnull public QSelection<T> between(@Nonnull String property, @Nonnull Object a, @Nonnull Object b)
between in class QRestrictor<T>QRestrictor.between(java.lang.String, java.lang.Object, java.lang.Object)@Nonnull public QSelection<T> descending(@Nonnull String property)
descending in class QCriteriaQueryBase<T>QCriteriaQueryBase.descending(java.lang.String)@Nonnull public QSelection<T> eq(@Nonnull String property, double value)
eq in class QRestrictor<T>QRestrictor.eq(java.lang.String, double)@Nonnull public QSelection<T> eq(@Nonnull String property, long value)
eq in class QRestrictor<T>QRestrictor.eq(java.lang.String, long)@Nonnull public QSelection<T> eq(@Nonnull String property, @Nullable Object value)
eq in class QRestrictor<T>QRestrictor.eq(java.lang.String, java.lang.Object)@Nonnull public QSelection<T> ge(@Nonnull String property, double value)
ge in class QRestrictor<T>QRestrictor.ge(java.lang.String, double)@Nonnull public QSelection<T> ge(@Nonnull String property, long value)
ge in class QRestrictor<T>QRestrictor.ge(java.lang.String, long)@Nonnull public QSelection<T> ge(@Nonnull String property, @Nonnull Object value)
ge in class QRestrictor<T>QRestrictor.ge(java.lang.String, java.lang.Object)@Nonnull public QSelection<T> gt(@Nonnull String property, double value)
gt in class QRestrictor<T>QRestrictor.gt(java.lang.String, double)@Nonnull public QSelection<T> gt(@Nonnull String property, long value)
gt in class QRestrictor<T>QRestrictor.gt(java.lang.String, long)@Nonnull public QSelection<T> gt(@Nonnull String property, @Nonnull Object value)
gt in class QRestrictor<T>QRestrictor.gt(java.lang.String, java.lang.Object)@Nonnull public QSelection<T> ilike(@Nonnull String property, @Nonnull Object value)
ilike in class QRestrictor<T>QRestrictor.ilike(java.lang.String, java.lang.Object)@Nonnull public QSelection<T> isnotnull(@Nonnull String property)
isnotnull in class QRestrictor<T>QRestrictor.isnotnull(java.lang.String)@Nonnull public QSelection<T> isnull(@Nonnull String property)
isnull in class QRestrictor<T>QRestrictor.isnull(java.lang.String)@Nonnull public QSelection<T> le(@Nonnull String property, double value)
le in class QRestrictor<T>QRestrictor.le(java.lang.String, double)@Nonnull public QSelection<T> le(@Nonnull String property, long value)
le in class QRestrictor<T>QRestrictor.le(java.lang.String, long)@Nonnull public QSelection<T> le(@Nonnull String property, @Nonnull Object value)
le in class QRestrictor<T>QRestrictor.le(java.lang.String, java.lang.Object)@Nonnull public QSelection<T> like(@Nonnull String property, @Nonnull Object value)
like in class QRestrictor<T>QRestrictor.like(java.lang.String, java.lang.Object)@Nonnull public QSelection<T> lt(@Nonnull String property, double value)
lt in class QRestrictor<T>QRestrictor.lt(java.lang.String, double)@Nonnull public QSelection<T> lt(@Nonnull String property, long value)
lt in class QRestrictor<T>QRestrictor.lt(java.lang.String, long)@Nonnull public QSelection<T> lt(@Nonnull String property, @Nonnull Object value)
lt in class QRestrictor<T>QRestrictor.lt(java.lang.String, java.lang.Object)@Nonnull public QSelection<T> ne(@Nonnull String property, double value)
ne in class QRestrictor<T>QRestrictor.ne(java.lang.String, double)@Nonnull public QSelection<T> ne(@Nonnull String property, long value)
ne in class QRestrictor<T>QRestrictor.ne(java.lang.String, long)@Nonnull public QSelection<T> ne(@Nonnull String property, @Nullable Object value)
ne in class QRestrictor<T>QRestrictor.ne(java.lang.String, java.lang.Object)@Deprecated @Nonnull public QSelection<T> or(@Nonnull QOperatorNode a1, @Nonnull QOperatorNode a2, @Nonnull QOperatorNode... a)
or in class QRestrictor<T>to.etc.webapp.query.QCriteriaQueryBase#or(to.etc.webapp.query.QOperatorNode[])@Nonnull public QSelection<T> sqlCondition(@Nonnull String sql)
sqlCondition in class QRestrictor<T>QRestrictor.sqlCondition(java.lang.String)@Nonnull public QSelection<T> fetch(@Nonnull String property, @Nonnull QFetchStrategy strategy)
QCriteriaQueryBasefetch in class QCriteriaQueryBase<T>@Nonnull public QSelection<T> fetch(@Nonnull String property)
public QSelection<T> testId(@Nullable String testId)
Copyright © 2017 etc.to. All rights reserved.