Uses of Interface
io.ebean.Query
Packages that use 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.Query.alsoIf(BooleanSupplier predicate, Consumer<Query<T>> apply) Apply changes to the query conditional on the supplied predicate.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.Deprecated, for removal: This API element is subject to removal in a future version.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.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.Deprecated, for removal: This API element is subject to removal in a future version.migrate tosetOrderBy(OrderBy).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 theCacheModeto use the query cache for executing this query.Query.setUseQueryCache(boolean enabled) Query.setUseQueryCache(CacheMode queryCacheMode) Set theCacheModeto 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.Query.usingMaster()Ensure that the master DataSource is used if there is a read only data source being used (that is using a read replica database potentially with replication lag).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> voidApply 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.longCopy from a source index to a new index taking only the documents matching the given 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.Equal To the result of a sub-query.Equal To the result of a sub-query.static <T> ExpressionStdOperators.eq(Query.Property<T> property, Query<?> subQuery) Equal to - for a property and sub-query.Exists expressionExists expressionGreater Than or Equal to the result of a sub-query.Greater Than or Equal to the result of a sub-query.static <T> ExpressionStdOperators.ge(Query.Property<T> property, Query<?> subQuery) Greater than or equal to - for a property and sub-query.Greater Than the result of a sub-query.Greater Than the result of a sub-query.static <T> ExpressionStdOperators.gt(Query.Property<T> property, Query<?> subQuery) Greater than - for a property and sub-query.static ExpressionIn - using a subQuery.In - using a subQuery.In - using a subQuery.static <T> ExpressionStdOperators.in(Query.Property<T> property, Query<?> subQuery) In - for a given property and sub-query.<T> voidDocumentStore.indexByQuery(Query<T> query) Update the associated document store using the result of the query.<T> voidDocumentStore.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.Less Than or Equal to the result of a sub-query.Less Than or Equal to the result of a sub-query.static <T> ExpressionStdOperators.le(Query.Property<T> property, Query<?> subQuery) Greater than or equal to - for a property and sub-query.Less Than the result of a sub-query.Less Than the result of a sub-query.static <T> ExpressionStdOperators.lt(Query.Property<T> property, Query<?> subQuery) Less than - for a property and sub-query.Not Equal To the result of a sub-query.Not Equal To the result of a sub-query.static <T> ExpressionStdOperators.ne(Query.Property<T> property, Query<?> subQuery) Not equal to - for a property and sub-query.Not exists expressionNot exists expressionNot In - using a subQuery.Not In - using a subQuery.static <T> ExpressionStdOperators.notIn(Query.Property<T> property, Query<?> subQuery) Not In - for a given property and sub-query.<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.voidAssociate this OrderBy with a query.Database.validateQuery(Query<T> query) Returns the set of properties/paths that are unknown (do not map to known properties or paths).Modifier and TypeMethodDescriptionQuery.alsoIf(BooleanSupplier predicate, Consumer<Query<T>> apply) Apply changes to the query conditional on the supplied predicate. -
Uses of Query in io.ebean.config.dbplatform
Methods in io.ebean.config.dbplatform that return QueryMethods in io.ebean.config.dbplatform with parameters of type Query -
Uses of Query in io.ebean.event
Methods in io.ebean.event that return Query -
Uses of Query in io.ebean.plugin
Methods in io.ebean.plugin with parameters of type QueryModifier and TypeMethodDescriptionvoidBeanType.addInheritanceWhere(Query<?> query) Add the discriminator value to the query if needed.voidApply 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
Subinterfaces of Query in io.ebean.serviceModifier and TypeInterfaceDescriptioninterfaceExtension of Query to build FetchGroup via query beans. -
Uses of Query in io.ebean.text
Methods in io.ebean.text with parameters of type Query
orderBy().