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 jakarta.persistence.PersistenceException;
import java.sql.SQLException;
import java.util.Collection;
import java.util.List;
/**
* The Object Relational query execution API.
*/
public interface OrmQueryEngine {
/**
* Execute the ORM query returning the JDBC ResultSet (for DTO query processing).
*/
SpiResultSet findResultSet(OrmQueryRequest request);
/**
* 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 findSingleAttributeCollection query.
*/
> A findSingleAttributeCollection(OrmQueryRequest> request, A collection);
/**
* 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);
/**
* Return true if multi-value bind is supported for this type (and current platform).
*/
boolean isMultiValueSupported(Class> valueType);
int forwardOnlyFetchSize();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy