- All Superinterfaces:
BeanQueryRequest<T>
- All Known Implementing Classes:
OrmQueryRequest
Defines the ORM query request api.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the bean cache hits (when all hits / no misses).Return the bean cache hits for findMap (when all hits / no misses).Return the bean cache hits for findMap (when all hits / no misses).dbLikeClause(boolean rawLikeExpression) Return the Database platform like clause.intdelete()Execute the query as a delete.Return the associated BeanDescriptor.voidWill end a locally created transaction.escapeLikeString(String value) Escapes a string to use it as exact match in Like clause.intExecute the find row count query.voidExecute findEach with a batch consumer.voidExecute findEach iterating results one bean at a time.voidfindEachWhile(Predicate<T> consumer) Execute the find returning a QueryIterator and visitor pattern.findId()Execute the query as findById.<A> List<A> findIds()Execute the find ids query.Execute the find returning a QueryIterator.findList()Execute the query as findList.findMap()Execute the query as findMap.Execute returning the ResultSet.findSet()Execute the query as findSet.<A extends Collection<?>>
AfindSingleAttributeCollection(A collection) Execute the findSingleAttributeCollection query.Execute the finVersions() query.booleanMaybe hit the bean cache returning true if everything was obtained from the cache (that there were no misses).<A> ATry to get the query result from the query cache.voidThis will create a local (readOnly) transaction if no current transaction exists.booleanReturn true if delete by statement is allowed for this type given cascade rules etc.booleanReturn true if hitting bean cache and returning all beans from cache.voidMark the underlying transaction as not being query only.voidPrepare the query for execution.query()Return the query.voidresetBeanCacheAutoMode(boolean findOne) Reset Bean cache mode AUTO - require explicit setting for bean cache use with findList().intupdate()Execute the query as a update.Methods inherited from interface io.ebean.event.BeanQueryRequest
database, isMultiValueIdSupported, isMultiValueSupported, isPadInExpression, transaction
-
Method Details
-
query
Return the query.- Specified by:
queryin interfaceBeanQueryRequest<T>
-
descriptor
BeanDescriptor<T> descriptor()Return the associated BeanDescriptor. -
prepareQuery
void prepareQuery()Prepare the query for execution. -
initTransIfRequired
void initTransIfRequired()This will create a local (readOnly) transaction if no current transaction exists.A transaction may have been passed in explicitly or currently be active in the thread local. If not, then a readOnly transaction is created to execute this query.
-
endTransIfRequired
void endTransIfRequired()Will end a locally created transaction.It ends the transaction by using a rollback() as the transaction is known to be readOnly.
-
delete
int delete()Execute the query as a delete. -
update
int update()Execute the query as a update. -
findId
Object findId()Execute the query as findById. -
findCount
int findCount()Execute the find row count query. -
findIds
Execute the find ids query. -
findEach
Execute findEach iterating results one bean at a time. -
findEach
Execute findEach with a batch consumer. -
findEachWhile
Execute the find returning a QueryIterator and visitor pattern. -
findIterate
QueryIterator<T> findIterate()Execute the find returning a QueryIterator. -
findVersions
Execute the finVersions() query. -
findList
Execute the query as findList. -
findSet
Execute the query as findSet. -
findMap
Execute the query as findMap. -
findSingleAttributeCollection
Execute the findSingleAttributeCollection query. -
findResultSet
SpiResultSet findResultSet()Execute returning the ResultSet. -
getFromQueryCache
<A> A getFromQueryCache()Try to get the query result from the query cache. -
getFromBeanCache
boolean getFromBeanCache()Maybe hit the bean cache returning true if everything was obtained from the cache (that there were no misses).Do this for findList() on many natural keys or many Ids.
-
beanCacheHits
Return the bean cache hits (when all hits / no misses). -
beanCacheHitsAsMap
Return the bean cache hits for findMap (when all hits / no misses). -
beanCacheHitsAsSet
Return the bean cache hits for findMap (when all hits / no misses). -
resetBeanCacheAutoMode
void resetBeanCacheAutoMode(boolean findOne) Reset Bean cache mode AUTO - require explicit setting for bean cache use with findList(). -
dbLikeClause
Return the Database platform like clause. -
escapeLikeString
Escapes a string to use it as exact match in Like clause. -
markNotQueryOnly
void markNotQueryOnly()Mark the underlying transaction as not being query only. -
isDeleteByStatement
boolean isDeleteByStatement()Return true if delete by statement is allowed for this type given cascade rules etc. -
isGetAllFromBeanCache
boolean isGetAllFromBeanCache()Return true if hitting bean cache and returning all beans from cache.
-