io.ebeaninternal.server.core.OrmQueryEngine Maven / Gradle / Ivy
package io.ebeaninternal.server.core;
import io.ebean.QueryIterator;
import io.ebean.Version;
import io.ebean.bean.BeanCollection;
import javax.persistence.PersistenceException;
import java.sql.SQLException;
import java.util.List;
/**
* The Object Relational query execution API.
*/
public interface OrmQueryEngine {
/**
* Execute the 'find by id' query returning a single bean.
*/
T findId(OrmQueryRequest request);
/**
* Execute the findList, findSet, findMap query returning an appropriate BeanCollection.
*/
BeanCollection findMany(OrmQueryRequest request);
/**
* Execute the findSingleAttributeList query.
*/
List findSingleAttributeList(OrmQueryRequest> request);
/**
* Execute the findVersions query.
*/
List> findVersions(OrmQueryRequest request);
/**
* Execute the query using a QueryIterator.
*/
QueryIterator findIterate(OrmQueryRequest request);
/**
* Execute the row count query.
*/
int findCount(OrmQueryRequest request);
/**
* Execute the find id's query.
*/
List findIds(OrmQueryRequest> request);
/**
* Execute the query as a delete statement.
*/
int delete(OrmQueryRequest request);
/**
* Execute the query as a update statement.
*/
int update(OrmQueryRequest request);
/**
* Translate the SQLException to a specific persistence exception type if possible.
*/
PersistenceException translate(OrmQueryRequest request, String bindLog, String sql, SQLException e);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy