Uses of Interface
io.ebean.Query
Package
Description
Database platform specific support
Persist and Query Event Controllers and Listeners
Provides a API for plugins.
Utility objects for CSV, JSON and XML processing.
-
Uses of Query in io.ebean
Modifier and TypeMethodDescriptionSet root table alias.Apply the path properties to the query replacing the select and fetch clauses.Apply the path properties replacing the select and fetch clauses.Add a property with ascending order to this OrderBy.Add a property with ascending order to this OrderBy.ExpressionList.asDraft()
Execute the query against the draft set of tables.Query.asDraft()
Execute the query against the draft set of tables.Perform an 'As of' query using history tables to return the object graph as of a time in the past.Perform an 'As of' query using history tables to return the object graph as of a time in the past.Query.copy()
Return a copy of the query.<T> Query<T>
Database.createNamedQuery
(Class<T> beanType, String namedQuery) Create a named query.static <T> Query<T>
DB.createNamedQuery
(Class<T> beanType, String namedQuery) Create a named query.<T> Query<T>
Database.createQuery
(Class<T> beanType) Create a query for an entity bean and synonym forDatabase.find(Class)
.<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>
DB.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).Add a property with descending order to this OrderBy.Add a property with descending order to this OrderBy.Specify a path to fetch eagerly including all its properties.Query.fetch
(String path, FetchConfig fetchConfig) Additionally specify a JoinConfig to specify a "query join" and or define the lazy loading query.Specify a path to fetch eagerly including specific properties.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.fetchCache
(String path) Fetch the path eagerly using L2 cache.Query.fetchCache
(String path, String fetchProperties) Fetch the path and properties using L2 bean cache.Fetch the path lazily (via batch lazy loading).Fetch the path and properties lazily (via batch lazy loading).Query.fetchQuery
(String path) Fetch the path eagerly using a "query join" (separate SQL query).Query.fetchQuery
(String path, String fetchProperties) Fetch the path and properties using a "query join" (separate SQL query).<T> Query<T>
Create a query for a type of entity bean.static <T> Query<T>
Create a query for a type of entity bean.<T> Query<T>
Database.findNative
(Class<T> beanType, String nativeSql) Create a query using native SQL.static <T> Query<T>
DB.findNative
(Class<T> beanType, String nativeSql) Create a query using native SQL.ExpressionList.forUpdate()
Execute using "for update" clause which results in the DB locking the record.Query.forUpdate()
Execute using "for update" clause which results in the DB locking the record.ExpressionList.forUpdateNoWait()
Execute using "for update" clause with No Wait option.Query.forUpdateNoWait()
Execute using "for update" clause with "no wait" option.ExpressionList.forUpdateSkipLocked()
Execute using "for update" clause with Skip Locked option.Query.forUpdateSkipLocked()
Execute using "for update" clause with "skip locked" option.FutureIds.getQuery()
Returns the original query used to fetch the Id's.FutureList.getQuery()
Return the query that is being executed by a background thread.OrderBy.getQuery()
Return the associated query if there is one.Query.having
(Expression addExpressionToHaving) Add an expression to the having clause returning the query.Creates a native sql query.Creates a native sql query.Set the order by clause replacing the existing order by clause if there is one.Set the order by clause replacing the existing order by clause if there is one.ExpressionList.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.orderById
(boolean orderById) Controls, if paginated queries should always append an 'order by id' statement at the end to guarantee a deterministic sort result.BeanFinder.query()
Creates a query.Creates a query using the ORM query language.ExpressionList.query()
Return the query that owns this expression list.Finder.query()
Creates a query.Creates a query using the ORM query language.ExpressionList.select
(FetchGroup<T> fetchGroup) Apply the fetchGroup which defines what part of the object graph to load.Specify specific properties to fetch on the main/root bean (aka partial object).Query.select
(FetchGroup<T> fetchGroup) Apply the fetchGroup which defines what part of the object graph to load.Specify the properties to fetch on the root level entity bean in comma delimited format.Query.setAllowLoadErrors()
Execute the query allowing properties with invalid JSON to be collected and not fail the query.Query.setAutoTune
(boolean autoTune) Explicitly specify whether to use AutoTune for this query.Query.setBaseTable
(String baseTable) Set the base table to use for this query.ExpressionList.setBeanCacheMode
(CacheMode beanCacheMode) Set the mode to use the bean cache when executing this query.Query.setBeanCacheMode
(CacheMode beanCacheMode) Set the mode to use the bean cache when executing this query.Query.setBufferFetchSizeHint
(int fetchSize) A hint which for JDBC translates to the Statement.fetchSize().ExpressionList.setCountDistinct
(CountDistinctOrder orderBy) Extended version for setDistinct in conjunction with "findSingleAttributeList";Query.setCountDistinct
(CountDistinctOrder orderBy) Extended version for setDistinct in conjunction with "findSingleAttributeList";ExpressionList.setDisableLazyLoading
(boolean disableLazyLoading) Set true if you want to disable lazy loading.Query.setDisableLazyLoading
(boolean disableLazyLoading) Set true if you want to disable lazy loading.ExpressionList.setDisableReadAuditing()
Disable read auditing for this query.Query.setDisableReadAuditing()
Disable read auditing for this query.ExpressionList.setDistinct
(boolean distinct) Set whether this query uses DISTINCT.Query.setDistinct
(boolean isDistinct) Set whether this query uses DISTINCT.ExpressionList.setDocIndexName
(String indexName) Set the index(es) to search for a document store which uses partitions.Query.setDocIndexName
(String indexName) Set the index(es) to search for a document store which uses partitions.Query.setFirstRow
(int firstRow) Set the first row to return for this query.Set the Id value to query.ExpressionList.setIncludeSoftDeletes()
Execute the query including soft deleted rows.Query.setIncludeSoftDeletes()
Execute the query including soft deleted rows.Query.setInheritType
(Class<? extends T> type) Restrict the query to only return subtypes of the given inherit type.Set a label on the query (to help identify query execution statistics).Set a label on the query.Query.setLazyLoadBatchSize
(int lazyLoadBatchSize) Set the default lazy loading batch size to use.Query.setLoadBeanCache
(boolean loadBeanCache) Will be deprecated - migrate to use setBeanCacheMode(CacheMode.RECACHE).Set the name of the property which values become the key of a map.Set the property to use as keys for a map.Query.setMaxRows
(int maxRows) Set the maximum number of rows to return in the query.Set an OrderBy object to replace any existing OrderBy clause.ExpressionList.setOrderBy
(String orderBy) Deprecated.Query.setOrderBy
(OrderBy<T> orderBy) Set an OrderBy object to replace any existing OrderBy clause.Query.setParameter
(int position, Object value) Set an ordered bind parameter according to its position.Query.setParameter
(Object value) Bind the next positioned parameter.Query.setParameter
(String name, Object value) Set a named bind parameter.Query.setParameters
(Object... values) Bind all the positioned parameters.Query.setPersistenceContextScope
(PersistenceContextScope scope) Specify the PersistenceContextScope to use for this query.Query.setProfileLocation
(ProfileLocation profileLocation) Set the profile location of this query.Set RawSql to use for this query.Query.setReadOnly
(boolean readOnly) When set to true when you want the returned beans to be read only.Query.setTimeout
(int secs) Set a timeout on this query.ExpressionList.setUseCache
(boolean useCache) Set to true when this query should use the bean cache.Query.setUseCache
(boolean useCache) Set this to false to not use the bean cache.ExpressionList.setUseDocStore
(boolean useDocsStore) Set to true if this query should execute against the doc store.Query.setUseDocStore
(boolean useDocStore) Set to true if this query should execute against the doc store.ExpressionList.setUseQueryCache
(boolean enabled) ExpressionList.setUseQueryCache
(CacheMode useCache) Set theCacheMode
to use the query cache for executing this query.Query.setUseQueryCache
(boolean enabled) Query.setUseQueryCache
(CacheMode queryCacheMode) Set theCacheMode
to use the query for executing this query.ExpressionList.usingConnection
(Connection connection) Execute the query using the given connection.Query.usingConnection
(Connection connection) Execute the query using the given connection.Query.usingDatabase
(Database database) Execute the query using the given database.ExpressionList.usingTransaction
(Transaction transaction) Execute the query using the given transaction.Query.usingTransaction
(Transaction transaction) Execute the query using the given transaction.Query.where
(Expression expression) Add a single Expression to the where clause returning the query.ExpressionList.withLock
(Query.LockType lockType) Execute the query with the given lock type and WAIT.ExpressionList.withLock
(Query.LockType lockType, Query.LockWait lockWait) Execute the query with the given lock type and lock wait.Query.withLock
(Query.LockType lockType) Execute the query with the given lock type and WAIT.Query.withLock
(Query.LockType lockType, Query.LockWait lockWait) Execute the query with the given lock type and lock wait.Modifier and TypeMethodDescription<T> void
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
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.Exists expressionExists expression<T> boolean
ExtendedServer.exists
(Query<T> ormQuery, Transaction transaction) Execute the query returning true if a row is found.<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, int batch, Consumer<List<T>> consumer, Transaction t) Execute findEach with batch consumer.<T> void
ExtendedServer.findEach
(Query<T> query, Consumer<T> consumer, Transaction transaction) Execute the query visiting the each bean one at a time.<T> void
ExtendedServer.findEachWhile
(Query<T> query, 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> Stream<T>
ExtendedServer.findStream
(Query<T> query, Transaction transaction) Execute the query returning the result as a Stream.ExtendedServer.findVersions
(Query<T> query, Transaction transaction) Return versions of a @History entity bean.static Expression
In - using a subQuery.In - using a 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>
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.Not exists expressionNot exists expressionNot In - using a subQuery.Not In - using a subQuery.<T> List<T>
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
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.Database.validateQuery
(Query<T> query) Returns the set of properties/paths that are unknown (do not map to known properties or paths). -
Uses of Query in io.ebean.config.dbplatform
-
Uses of Query in io.ebean.event
-
Uses of Query in io.ebean.plugin
Modifier and TypeMethodDescriptionvoid
BeanType.addInheritanceWhere
(Query<?> query) Add the discriminator value to the query if needed.void
Apply the appropriate fetch path to the query such that the query returns beans matching the document store structure with the expected embedded properties. -
Uses of Query in io.ebean.service
Modifier and TypeInterfaceDescriptioninterface
Extension of Query to build FetchGroup via query beans. -
Uses of Query in io.ebean.text