
io.ebeaninternal.server.core.SpiOrmQueryRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean Show documentation
Show all versions of ebean Show documentation
composite of common runtime dependencies for all platforms
package io.ebeaninternal.server.core;
import io.ebean.QueryIterator;
import io.ebean.Version;
import io.ebean.bean.BeanCollection;
import io.ebeaninternal.api.SpiQuery;
import io.ebeaninternal.server.deploy.BeanDescriptor;
import io.ebeanservice.docstore.api.DocQueryRequest;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Predicate;
/**
* Defines the ORM query request api.
*/
public interface SpiOrmQueryRequest extends DocQueryRequest {
/**
* Return the query.
*/
SpiQuery getQuery();
/**
* Return the associated BeanDescriptor.
*/
BeanDescriptor> getBeanDescriptor();
/**
* 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.
*
*/
void initTransIfRequired();
/**
* Will end a locally created transaction.
*
* It ends the transaction by using a rollback() as the transaction is known
* to be readOnly.
*
*/
void endTransIfRequired();
/**
* Execute the query as a delete.
*/
int delete();
/**
* Execute the query as a update.
*/
int update();
/**
* Execute the query as findById.
*/
Object findId();
/**
* Execute the find row count query.
*/
int findCount();
/**
* Execute the find ids query.
*/
List findIds();
/**
* Execute the find returning a QueryIterator and visitor pattern.
*/
void findEach(Consumer consumer);
/**
* Execute the find returning a QueryIterator and visitor pattern.
*/
void findEachWhile(Predicate consumer);
/**
* Execute the find returning a QueryIterator.
*/
QueryIterator findIterate();
/**
* Execute the finVersions() query.
*/
List> findVersions();
/**
* Execute the query as findList.
*/
List findList();
/**
* Execute the query as findSet.
*/
Set> findSet();
/**
* Execute the query as findMap.
*/
Map, ?> findMap();
/**
* Execute the findSingleAttributeList query.
*/
List findSingleAttributeList();
/**
* Try to get the query result from the query cache.
*/
BeanCollection getFromQueryCache();
/**
* Return the Database platform like clause.
*/
String getDBLikeClause();
/**
* Mark the underlying transaction as not being query only.
*/
void markNotQueryOnly();
/**
* Return true if this query is expected to use the doc store.
*/
boolean isUseDocStore();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy