Package | Description |
---|---|
io.ebean | |
io.ebean.config.dbplatform |
Database platform specific support
|
io.ebean.event |
Persist and Query Event Controllers and Listeners
|
io.ebean.plugin |
Provides a API for plugins.
|
io.ebean.text |
Utility objects for CSV, JSON and XML processing.
|
io.ebeanservice.docstore.api |
The service API for document store integration.
|
io.ebeanservice.docstore.api.support |
Support objects for implementing integration.
|
io.ebeanservice.docstore.none |
"No op" implementation of document store.
|
Modifier and Type | Method and Description |
---|---|
Query<T> |
Query.alias(String alias)
Set root table alias.
|
Query<T> |
Query.apply(FetchPath fetchPath)
Apply the path properties replacing the select and fetch clauses.
|
Query<T> |
ExpressionList.apply(FetchPath fetchPath)
Apply the path properties to the query replacing the select and fetch clauses.
|
Query<T> |
OrderBy.asc(String propertyName)
Add a property with ascending order to this OrderBy.
|
Query<T> |
OrderBy.asc(String propertyName,
String collation)
Add a property with ascending order to this OrderBy.
|
Query<T> |
Query.asDraft()
Execute the query against the draft set of tables.
|
Query<T> |
ExpressionList.asDraft()
Execute the query against the draft set of tables.
|
Query<T> |
Query.asOf(Timestamp asOf)
Perform an 'As of' query using history tables to return the object graph
as of a time in the past.
|
Query<T> |
ExpressionList.asOf(Timestamp asOf)
Perform an 'As of' query using history tables to return the object graph
as of a time in the past.
|
Query<T> |
Query.copy()
Return a copy of the query.
|
static <T> Query<T> |
DB.createNamedQuery(Class<T> beanType,
String namedQuery)
Create a named query.
|
<T> Query<T> |
Database.createNamedQuery(Class<T> beanType,
String namedQuery)
Create a named query.
|
static <T> Query<T> |
Ebean.createNamedQuery(Class<T> beanType,
String namedQuery)
Create a named query.
|
static <T> Query<T> |
DB.createQuery(Class<T> beanType)
Create a query for a type of entity bean.
|
<T> Query<T> |
Database.createQuery(Class<T> beanType)
Create a query for an entity bean and synonym for
Database.find(Class) . |
static <T> Query<T> |
Ebean.createQuery(Class<T> beanType)
Create a query for a type of entity bean.
|
static <T> Query<T> |
DB.createQuery(Class<T> beanType,
String eql)
Parse the Ebean query language statement returning the query which can then
be modified (add expressions, change order by clause, change maxRows, change
fetch and select paths etc).
|
<T> Query<T> |
Database.createQuery(Class<T> beanType,
String ormQuery)
Parse the Ebean query language statement returning the query which can then
be modified (add expressions, change order by clause, change maxRows, change
fetch and select paths etc).
|
static <T> Query<T> |
Ebean.createQuery(Class<T> beanType,
String eql)
Parse the Ebean query language statement returning the query which can then
be modified (add expressions, change order by clause, change maxRows, change
fetch and select paths etc).
|
Query<T> |
OrderBy.desc(String propertyName)
Add a property with descending order to this OrderBy.
|
Query<T> |
OrderBy.desc(String propertyName,
String collation)
Add a property with descending order to this OrderBy.
|
Query<T> |
Query.fetch(String path)
Specify a path to fetch eagerly including all its properties.
|
Query<T> |
Query.fetch(String path,
FetchConfig fetchConfig)
Additionally specify a JoinConfig to specify a "query join" and or define
the lazy loading query.
|
Query<T> |
Query.fetch(String path,
String fetchProperties)
Specify a path to fetch eagerly including specific properties.
|
Query<T> |
Query.fetch(String path,
String fetchProperties,
FetchConfig fetchConfig)
Additionally specify a FetchConfig to use a separate query or lazy loading
to load this path.
|
Query<T> |
Query.fetchLazy(String path)
Fetch the path lazily (via batch lazy loading).
|
Query<T> |
Query.fetchLazy(String path,
String fetchProperties)
Fetch the path and properties lazily (via batch lazy loading).
|
Query<T> |
Query.fetchQuery(String path)
Fetch the path eagerly using a "query join" (separate SQL query).
|
Query<T> |
Query.fetchQuery(String path,
String fetchProperties)
Fetch the path and properties using a "query join" (separate SQL query).
|
static <T> Query<T> |
DB.find(Class<T> beanType)
Create a query for a type of entity bean.
|
<T> Query<T> |
Database.find(Class<T> beanType)
Create a query for a type of entity bean.
|
static <T> Query<T> |
Ebean.find(Class<T> beanType)
Create a query for a type of entity bean.
|
static <T> Query<T> |
DB.findNative(Class<T> beanType,
String nativeSql)
Create a query using native SQL.
|
<T> Query<T> |
Database.findNative(Class<T> beanType,
String nativeSql)
Create a query using native SQL.
|
static <T> Query<T> |
Ebean.findNative(Class<T> beanType,
String nativeSql)
Create a query using native SQL.
|
Query<T> |
Query.forUpdate()
Execute using "for update" clause which results in the DB locking the record.
|
Query<T> |
ExpressionList.forUpdate()
Execute using "for update" clause which results in the DB locking the record.
|
Query<T> |
Query.forUpdateNoWait()
Execute using "for update" clause with "no wait" option.
|
Query<T> |
ExpressionList.forUpdateNoWait()
Execute using "for update" clause with No Wait option.
|
Query<T> |
Query.forUpdateSkipLocked()
Execute using "for update" clause with "skip locked" option.
|
Query<T> |
ExpressionList.forUpdateSkipLocked()
Execute using "for update" clause with Skip Locked option.
|
Query<T> |
OrderBy.getQuery()
Return the associated query if there is one.
|
Query<T> |
FutureList.getQuery()
Return the query that is being executed by a background thread.
|
Query<T> |
FutureIds.getQuery()
Returns the original query used to fetch the Id's.
|
Query<T> |
Query.having(Expression addExpressionToHaving)
Add an expression to the having clause returning the query.
|
Query<T> |
Finder.nativeSql(String nativeSql)
Creates a native sql query.
|
Query<T> |
Query.order(String orderByClause)
Set the order by clause replacing the existing order by clause if there is
one.
|
Query<T> |
ExpressionList.order(String orderByClause)
Set the order by clause replacing the existing order by clause if there is
one.
|
Query<T> |
Query.orderBy(String orderByClause)
Set the order by clause replacing the existing order by clause if there is
one.
|
Query<T> |
ExpressionList.orderBy(String orderBy)
Add an orderBy clause to the query.
|
Query<T> |
Query.orderById(boolean orderById)
Controls, if paginated queries should always append an 'order by id' statement at the end to
guarantee a deterministic sort result.
|
Query<T> |
ExpressionList.query()
Return the query that owns this expression list.
|
Query<T> |
Finder.query()
Creates a query.
|
Query<T> |
Finder.query(String ormQuery)
Creates a query using the ORM query language.
|
Query<T> |
Query.select(FetchGroup<T> fetchGroup)
Apply the fetchGroup which defines what part of the object graph to load.
|
Query<T> |
ExpressionList.select(FetchGroup<T> fetchGroup)
Apply the fetchGroup which defines what part of the object graph to load.
|
Query<T> |
Query.select(String fetchProperties)
Specify the properties to fetch on the root level entity bean in comma delimited format.
|
Query<T> |
ExpressionList.select(String properties)
Specify specific properties to fetch on the main/root bean (aka partial
object).
|
Query<T> |
Query.setAllowLoadErrors()
Execute the query allowing properties with invalid JSON to be collected and not fail the query.
|
Query<T> |
Query.setAutoTune(boolean autoTune)
Explicitly specify whether to use AutoTune for this query.
|
Query<T> |
Query.setBaseTable(String baseTable)
Set the base table to use for this query.
|
Query<T> |
Query.setBeanCacheMode(CacheMode beanCacheMode)
Set the mode to use the bean cache when executing this query.
|
Query<T> |
ExpressionList.setBeanCacheMode(CacheMode beanCacheMode)
Set the mode to use the bean cache when executing this query.
|
Query<T> |
Query.setBufferFetchSizeHint(int fetchSize)
A hint which for JDBC translates to the Statement.fetchSize().
|
Query<T> |
Query.setCountDistinct(CountDistinctOrder orderBy)
Extended version for setDistinct in conjunction with "findSingleAttributeList";
|
Query<T> |
ExpressionList.setCountDistinct(CountDistinctOrder orderBy)
Extended version for setDistinct in conjunction with "findSingleAttributeList";
|
Query<T> |
Query.setDisableLazyLoading(boolean disableLazyLoading)
Set true if you want to disable lazy loading.
|
Query<T> |
ExpressionList.setDisableLazyLoading(boolean disableLazyLoading)
Set true if you want to disable lazy loading.
|
Query<T> |
Query.setDisableReadAuditing()
Disable read auditing for this query.
|
Query<T> |
ExpressionList.setDisableReadAuditing()
Disable read auditing for this query.
|
Query<T> |
Query.setDistinct(boolean isDistinct)
Set whether this query uses DISTINCT.
|
Query<T> |
ExpressionList.setDistinct(boolean distinct)
Set whether this query uses DISTINCT.
|
Query<T> |
Query.setDocIndexName(String indexName)
Set the index(es) to search for a document store which uses partitions.
|
Query<T> |
ExpressionList.setDocIndexName(String indexName)
Set the index(es) to search for a document store which uses partitions.
|
Query<T> |
Query.setFirstRow(int firstRow)
Set the first row to return for this query.
|
Query<T> |
ExpressionList.setFirstRow(int firstRow)
Set the first row to fetch.
|
Query<T> |
Query.setId(Object id)
Set the Id value to query.
|
Query<T> |
Query.setIncludeSoftDeletes()
Execute the query including soft deleted rows.
|
Query<T> |
ExpressionList.setIncludeSoftDeletes()
Execute the query including soft deleted rows.
|
Query<T> |
Query.setInheritType(Class<? extends T> type)
Restrict the query to only return subtypes of the given inherit type.
|
Query<T> |
Query.setLabel(String label)
Set a label on the query.
|
Query<T> |
ExpressionList.setLabel(String label)
Set a label on the query (to help identify query execution statistics).
|
Query<T> |
Query.setLazyLoadBatchSize(int lazyLoadBatchSize)
Set the default lazy loading batch size to use.
|
Query<T> |
Query.setLoadBeanCache(boolean loadBeanCache)
Will be deprecated - migrate to use setBeanCacheMode(CacheMode.RECACHE).
|
Query<T> |
Query.setMapKey(String mapKey)
Set the property to use as keys for a map.
|
Query<T> |
ExpressionList.setMapKey(String mapKey)
Set the name of the property which values become the key of a map.
|
Query<T> |
Query.setMaxRows(int maxRows)
Set the maximum number of rows to return in the query.
|
Query<T> |
ExpressionList.setMaxRows(int maxRows)
Set the maximum number of rows to fetch.
|
Query<T> |
Query.setOrder(OrderBy<T> orderBy)
Set an OrderBy object to replace any existing OrderBy clause.
|
Query<T> |
Query.setOrderBy(OrderBy<T> orderBy)
Set an OrderBy object to replace any existing OrderBy clause.
|
Query<T> |
ExpressionList.setOrderBy(String orderBy)
Add an orderBy clause to the query.
|
Query<T> |
Query.setParameter(int position,
Object value)
Set an ordered bind parameter according to its position.
|
Query<T> |
Query.setParameter(String name,
Object value)
Set a named bind parameter.
|
Query<T> |
Query.setPersistenceContextScope(PersistenceContextScope scope)
Specify the PersistenceContextScope to use for this query.
|
Query<T> |
Query.setProfileId(int profileId)
Set an id to identify this query for profiling purposes.
|
Query<T> |
Query.setProfileLocation(ProfileLocation profileLocation)
Set the profile location of this query.
|
Query<T> |
Query.setRawSql(RawSql rawSql)
Set RawSql to use for this query.
|
Query<T> |
Query.setReadOnly(boolean readOnly)
When set to true when you want the returned beans to be read only.
|
Query<T> |
Query.setTimeout(int secs)
Set a timeout on this query.
|
default Query<T> |
Query.setUseCache(boolean useCache)
Set this to false to not use the bean cache.
|
Query<T> |
ExpressionList.setUseCache(boolean useCache)
Set to true when this query should use the bean cache.
|
Query<T> |
Query.setUseDocStore(boolean useDocStore)
Set to true if this query should execute against the doc store.
|
Query<T> |
ExpressionList.setUseDocStore(boolean useDocsStore)
Set to true if this query should execute against the doc store.
|
default Query<T> |
Query.setUseQueryCache(boolean enabled)
|
default Query<T> |
ExpressionList.setUseQueryCache(boolean enabled)
|
Query<T> |
Query.setUseQueryCache(CacheMode queryCacheMode)
Set the
CacheMode to use the query for executing this query. |
Query<T> |
ExpressionList.setUseQueryCache(CacheMode useCache)
Set the
CacheMode to use the query cache for executing this query. |
Query<T> |
Query.where(Expression expression)
Add a single Expression to the where clause returning the query.
|
Modifier and Type | Method and Description |
---|---|
<T> void |
FetchPath.apply(Query<T> query)
Apply the fetch path to the query.
|
static <T> Junction<T> |
Expr.conjunction(Query<T> query)
Return a list of expressions that will be joined by AND's.
|
<T> Junction<T> |
ExpressionFactory.conjunction(Query<T> query)
Return a list of expressions that will be joined by AND's.
|
<T> Junction<T> |
ExpressionFactory.conjunction(Query<T> query,
ExpressionList<T> parent)
Return a list of expressions that will be joined by AND's.
|
long |
DocumentStore.copyIndex(Query<?> query,
String newIndex,
int bulkBatchSize)
Copy from a source index to a new index taking only the documents
matching the given query.
|
<T> int |
ExtendedServer.delete(Query<T> query,
Transaction transaction)
Execute as a delete query deleting the 'root level' beans that match the predicates
in the query.
|
static <T> Junction<T> |
Expr.disjunction(Query<T> query)
Return a list of expressions that will be joined by OR's.
|
<T> Junction<T> |
ExpressionFactory.disjunction(Query<T> query)
Return a list of expressions that will be joined by OR's.
|
<T> Junction<T> |
ExpressionFactory.disjunction(Query<T> query,
ExpressionList<T> parent)
Return a list of expressions that will be joined by OR's.
|
<T> List<T> |
Database.draftRestore(Query<T> query)
Restore the draft beans matching the query back to the live state.
|
<T> List<T> |
Database.draftRestore(Query<T> query,
Transaction transaction)
Restore the draft beans matching the query back to the live state.
|
ExpressionList<T> |
ExpressionList.exists(Query<?> subQuery)
Exists expression
|
Expression |
ExpressionFactory.exists(Query<?> subQuery)
Exists expression
|
<T> int |
ExtendedServer.findCount(Query<T> query,
Transaction transaction)
Return the number of 'top level' or 'root' entities this query should return.
|
<T> void |
ExtendedServer.findEach(Query<T> query,
java.util.function.Consumer<T> consumer,
Transaction transaction)
Execute the query visiting the each bean one at a time.
|
<T> void |
ExtendedServer.findEachWhile(Query<T> query,
java.util.function.Predicate<T> consumer,
Transaction transaction)
Execute the query visiting the each bean one at a time.
|
<T> FutureRowCount<T> |
ExtendedServer.findFutureCount(Query<T> query,
Transaction transaction)
Execute find row count query in a background thread.
|
<T> FutureIds<T> |
ExtendedServer.findFutureIds(Query<T> query,
Transaction transaction)
Execute find Id's query in a background thread.
|
<T> FutureList<T> |
ExtendedServer.findFutureList(Query<T> query,
Transaction transaction)
Execute find list query in a background thread returning a FutureList object.
|
<A,T> List<A> |
ExtendedServer.findIds(Query<T> query,
Transaction transaction)
Return the Id values of the query as a List.
|
<T> QueryIterator<T> |
ExtendedServer.findIterate(Query<T> query,
Transaction transaction)
Return a QueryIterator for the query.
|
<T> List<T> |
ExtendedServer.findList(Query<T> query,
Transaction transaction)
Execute a query returning a list of beans.
|
<K,T> Map<K,T> |
ExtendedServer.findMap(Query<T> query,
Transaction transaction)
Execute the query returning the entity beans in a Map.
|
<T> T |
ExtendedServer.findOne(Query<T> query,
Transaction transaction)
Execute the query returning at most one entity bean or null (if no matching
bean is found).
|
<T> Optional<T> |
ExtendedServer.findOneOrEmpty(Query<T> query,
Transaction transaction)
Similar to findOne() but returns an Optional (rather than nullable).
|
<T> PagedList<T> |
ExtendedServer.findPagedList(Query<T> query,
Transaction transaction)
Return a PagedList for this query using firstRow and maxRows.
|
<T> Set<T> |
ExtendedServer.findSet(Query<T> query,
Transaction transaction)
Execute the query returning a set of entity beans.
|
<A,T> List<A> |
ExtendedServer.findSingleAttributeList(Query<T> query,
Transaction transaction)
Execute the query returning a list of values for a single property.
|
<T> List<Version<T>> |
ExtendedServer.findVersions(Query<T> query,
Transaction transaction)
Return versions of a @History entity bean.
|
ExpressionList<T> |
ExpressionList.in(String propertyName,
Query<?> subQuery)
In - using a subQuery.
|
static Expression |
Expr.in(String propertyName,
Query<?> subQuery)
In - using a subQuery.
|
Expression |
ExpressionFactory.in(String propertyName,
Query<?> subQuery)
In - using a subQuery.
|
<T> void |
DocumentStore.indexByQuery(Query<T> query)
Update the associated document store using the result of the query.
|
<T> void |
DocumentStore.indexByQuery(Query<T> query,
int bulkBatchSize)
Update the associated document store index using the result of the query additionally specifying a
bulkBatchSize to use for sending the messages to ElasticSearch.
|
default ExpressionList<T> |
ExpressionList.isIn(String propertyName,
Query<?> subQuery)
In - using a subQuery.
|
<T> Junction<T> |
ExpressionFactory.junction(Junction.Type type,
Query<T> query,
ExpressionList<T> parent)
Return a Text query junction for MUST, SHOULD or MUST NOT.
|
ExpressionList<T> |
ExpressionList.notExists(Query<?> subQuery)
Not exists expression
|
Expression |
ExpressionFactory.notExists(Query<?> subQuery)
Not exists expression
|
ExpressionList<T> |
ExpressionList.notIn(String propertyName,
Query<?> subQuery)
Not In - using a subQuery.
|
Expression |
ExpressionFactory.notIn(String propertyName,
Query<?> subQuery)
Not In - using a subQuery.
|
<T> List<T> |
Database.publish(Query<T> query)
Publish the beans that match the query returning the resulting published beans.
|
<T> List<T> |
Database.publish(Query<T> query,
Transaction transaction)
Publish the beans that match the query returning the resulting published beans.
|
void |
OrderBy.setQuery(Query<T> query)
Associate this OrderBy with a query.
|
<T> int |
ExtendedServer.update(Query<T> query,
Transaction transaction)
Execute the update query returning the number of rows updated.
|
<T> Set<String> |
Database.validateQuery(Query<T> query)
Returns the set of properties/paths that are unknown (do not map to known properties or paths).
|
Constructor and Description |
---|
OrderBy(Query<T> query,
String orderByClause)
Construct with a given query and order by clause.
|
Modifier and Type | Method and Description |
---|---|
Query<?> |
SqlLimitRequest.getOrmQuery()
return the query
|
Modifier and Type | Method and Description |
---|---|
String |
DatabasePlatform.completeSql(String sql,
Query<?> query) |
Modifier and Type | Method and Description |
---|---|
Query<T> |
BeanQueryRequest.getQuery()
Returns the query.
|
Modifier and Type | Method and Description |
---|---|
void |
BeanType.addInheritanceWhere(Query<?> query)
Add the discriminator value to the query if needed.
|
void |
BeanDocType.applyPath(Query<T> spiQuery)
Apply the appropriate fetch path to the query such that the query returns beans matching
the document store structure with the expected embedded properties.
|
Modifier and Type | Method and Description |
---|---|
<T> void |
PathProperties.apply(Query<T> query)
Apply these path properties as fetch paths to the query.
|
Modifier and Type | Method and Description |
---|---|
void |
DocStoreBeanAdapter.applyPath(Query<T> query)
Apply the document structure to the query so that it fetches the required properties to build
the document (typically in JSON form).
|
Modifier and Type | Method and Description |
---|---|
void |
DocStoreBeanBaseAdapter.applyPath(Query<T> query) |
Modifier and Type | Method and Description |
---|---|
long |
NoneDocStore.copyIndex(Query<?> query,
String newIndex,
int bulkBatchSize) |
<T> void |
NoneDocStore.indexByQuery(Query<T> query) |
<T> void |
NoneDocStore.indexByQuery(Query<T> query,
int bulkBatchSize) |
Copyright © 2019. All rights reserved.