Package | Description |
---|---|
org.apache.cayenne.query |
Defines standard queries supported by Cayenne and extension mechanism to create
custom queries.
|
Modifier and Type | Method and Description |
---|---|
ObjectSelect<T> |
ObjectSelect.addOrderBy(Collection<Ordering> orderings)
Adds new orderings to the list of orderings.
|
ObjectSelect<T> |
ObjectSelect.addOrderBy(Ordering... orderings)
Adds new orderings to the list of the existing orderings.
|
ObjectSelect<T> |
ObjectSelect.addOrderBy(String property)
Adds a single ascending ordering on a given property to the existing
ordering clause of this query.
|
ObjectSelect<T> |
ObjectSelect.addOrderBy(String property,
SortOrder sortOrder)
Adds a single ordering on a given property to the existing ordering
clause of this query.
|
ObjectSelect<T> |
ObjectSelect.addPrefetch(PrefetchTreeNode prefetch)
Merges prefetch into the query prefetch tree.
|
ObjectSelect<T> |
ObjectSelect.addPrefetch(String path,
int semantics)
Merges a prefetch path with specified semantics into the query prefetch
tree.
|
ObjectSelect<T> |
ObjectSelect.and(Collection<Expression> expressions)
AND's provided expressions to the existing WHERE clause expression.
|
ObjectSelect<T> |
ObjectSelect.and(Expression... expressions)
AND's provided expressions to the existing WHERE clause expression.
|
ObjectSelect<T> |
ObjectSelect.cacheGroups(Collection<String> cacheGroups) |
ObjectSelect<T> |
ObjectSelect.cacheGroups(String... cacheGroups) |
ObjectSelect<T> |
ObjectSelect.cacheStrategy(QueryCacheStrategy strategy,
String... cacheGroups) |
static ObjectSelect<DataRow> |
ObjectSelect.dataRowQuery(Class<?> entityType)
Creates a ObjectSelect that fetches data for an
ObjEntity
determined from a provided class. |
static ObjectSelect<DataRow> |
ObjectSelect.dataRowQuery(Class<?> entityType,
Expression expression)
Creates a ObjectSelect that fetches data for an
ObjEntity
determined from a provided class and uses provided expression for its
qualifier. |
ObjectSelect<T> |
ObjectSelect.dbEntityName(String dbEntityName)
Sets the
DbEntity name to fetch without changing the return type
of the query. |
static ObjectSelect<DataRow> |
ObjectSelect.dbQuery(String dbEntityName)
Creates a ObjectSelect that fetches DataRows for a
DbEntity
determined from provided "dbEntityName". |
static ObjectSelect<DataRow> |
ObjectSelect.dbQuery(String dbEntityName,
Expression expression)
Creates a ObjectSelect that fetches DataRows for a
DbEntity
determined from provided "dbEntityName" and uses provided expression for
its qualifier. |
ObjectSelect<T> |
ObjectSelect.entityName(String entityName)
Sets the
ObjEntity name to fetch without changing the return type
of the query. |
ObjectSelect<T> |
ObjectSelect.entityType(Class<?> entityType)
Sets the type of the entity to fetch without changing the return type of
the query.
|
ObjectSelect<DataRow> |
ObjectSelect.fetchDataRows()
Forces query to fetch DataRows.
|
ObjectSelect<T> |
ObjectSelect.limit(int fetchLimit)
Resets query fetch limit - a parameter that defines max number of objects
that should be ever be fetched from the database.
|
ObjectSelect<T> |
ObjectSelect.localCache(String... cacheGroups)
Instructs Cayenne to look for query results in the "local" cache when
running the query.
|
ObjectSelect<T> |
ObjectSelect.offset(int fetchOffset)
Resets query fetch offset - a parameter that defines how many objects
should be skipped when reading data from the database.
|
ObjectSelect<T> |
ObjectSelect.or(Collection<Expression> expressions)
OR's provided expressions to the existing WHERE clause expression.
|
ObjectSelect<T> |
ObjectSelect.or(Expression... expressions)
OR's provided expressions to the existing WHERE clause expression.
|
ObjectSelect<T> |
ObjectSelect.orderBy(Collection<Ordering> orderings)
Initializes or resets a list of orderings of this query.
|
ObjectSelect<T> |
ObjectSelect.orderBy(Ordering... orderings)
Initializes or resets a list of orderings of this query.
|
ObjectSelect<T> |
ObjectSelect.orderBy(String property)
Initializes ordering clause of this query with a single ascending
ordering on a given property.
|
ObjectSelect<T> |
ObjectSelect.orderBy(String property,
SortOrder sortOrder)
Initializes ordering clause of this query with a single ordering on a
given property.
|
ObjectSelect<T> |
ObjectSelect.pageSize(int pageSize)
Resets query page size.
|
ObjectSelect<T> |
ObjectSelect.prefetch(PrefetchTreeNode prefetch)
Resets internal prefetches to the new value.
|
ObjectSelect<T> |
ObjectSelect.prefetch(String path,
int semantics)
Resets internal prefetches to the new value, which is a single prefetch
with specified semantics.
|
static <T> ObjectSelect<T> |
ObjectSelect.query(Class<T> entityType)
Creates a ObjectSelect that selects objects of a given persistent class.
|
static <T> ObjectSelect<T> |
ObjectSelect.query(Class<T> entityType,
Expression expression)
Creates a ObjectSelect that selects objects of a given persistent class
and uses provided expression for its qualifier.
|
static <T> ObjectSelect<T> |
ObjectSelect.query(Class<T> entityType,
Expression expression,
List<Ordering> orderings)
Creates a ObjectSelect that selects objects of a given persistent class
and uses provided expression for its qualifier.
|
static <T> ObjectSelect<T> |
ObjectSelect.query(Class<T> resultType,
String entityName)
Creates a ObjectSelect that fetches data for
ObjEntity determined
from provided "entityName", but fetches the result of a provided type. |
ObjectSelect<T> |
ObjectSelect.sharedCache(String... cacheGroups)
Instructs Cayenne to look for query results in the "shared" cache when
running the query.
|
ObjectSelect<T> |
ObjectSelect.statementFetchSize(int size)
Sets fetch size of the PreparedStatement generated for this query.
|
ObjectSelect<T> |
ObjectSelect.where(Expression expression)
Initializes or resets a qualifier expression of this query.
|
ObjectSelect<T> |
ObjectSelect.where(String expressionString,
Object... parameters)
Initializes or resets a qualifier expression of this query, using
provided expression String and an array of position parameters.
|
Copyright © 2001–2015 Apache Cayenne. All rights reserved.