Package io.ebeaninternal.server.query
Class DefaultOrmQueryEngine
- java.lang.Object
-
- io.ebeaninternal.server.query.DefaultOrmQueryEngine
-
- All Implemented Interfaces:
OrmQueryEngine
public class DefaultOrmQueryEngine extends Object implements OrmQueryEngine
Main Finder implementation.
-
-
Constructor Summary
Constructors Constructor Description DefaultOrmQueryEngine(CQueryEngine queryEngine, Binder binder)
Create the Finder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> int
delete(OrmQueryRequest<T> request)
Execute the query as a delete statement.<T> int
findCount(OrmQueryRequest<T> request)
Execute the row count query.<T> T
findId(OrmQueryRequest<T> request)
Find a single bean using its unique id.<A> List<A>
findIds(OrmQueryRequest<?> request)
Execute the find id's query.<T> QueryIterator<T>
findIterate(OrmQueryRequest<T> request)
Execute the query using a QueryIterator.<T> BeanCollection<T>
findMany(OrmQueryRequest<T> request)
Execute the findList, findSet, findMap query returning an appropriate BeanCollection.<T> SpiResultSet
findResultSet(OrmQueryRequest<T> request)
Execute the ORM query returning the JDBC ResultSet (for DTO query processing).<A> List<A>
findSingleAttributeList(OrmQueryRequest<?> request)
Execute the findSingleAttributeList query.<T> List<Version<T>>
findVersions(OrmQueryRequest<T> request)
Execute the findVersions query.boolean
isMultiValueSupported(Class<?> cls)
Return true if multi-value bind is supported for this type (and current platform).<T> javax.persistence.PersistenceException
translate(OrmQueryRequest<T> request, String bindLog, String sql, SQLException e)
Translate the SQLException to a specific persistence exception type if possible.<T> int
update(OrmQueryRequest<T> request)
Execute the query as a update statement.
-
-
-
Constructor Detail
-
DefaultOrmQueryEngine
public DefaultOrmQueryEngine(CQueryEngine queryEngine, Binder binder)
Create the Finder.
-
-
Method Detail
-
translate
public <T> javax.persistence.PersistenceException translate(OrmQueryRequest<T> request, String bindLog, String sql, SQLException e)
Description copied from interface:OrmQueryEngine
Translate the SQLException to a specific persistence exception type if possible.- Specified by:
translate
in interfaceOrmQueryEngine
-
isMultiValueSupported
public boolean isMultiValueSupported(Class<?> cls)
Description copied from interface:OrmQueryEngine
Return true if multi-value bind is supported for this type (and current platform).- Specified by:
isMultiValueSupported
in interfaceOrmQueryEngine
-
delete
public <T> int delete(OrmQueryRequest<T> request)
Description copied from interface:OrmQueryEngine
Execute the query as a delete statement.- Specified by:
delete
in interfaceOrmQueryEngine
-
update
public <T> int update(OrmQueryRequest<T> request)
Description copied from interface:OrmQueryEngine
Execute the query as a update statement.- Specified by:
update
in interfaceOrmQueryEngine
-
findResultSet
public <T> SpiResultSet findResultSet(OrmQueryRequest<T> request)
Description copied from interface:OrmQueryEngine
Execute the ORM query returning the JDBC ResultSet (for DTO query processing).- Specified by:
findResultSet
in interfaceOrmQueryEngine
-
findCount
public <T> int findCount(OrmQueryRequest<T> request)
Description copied from interface:OrmQueryEngine
Execute the row count query.- Specified by:
findCount
in interfaceOrmQueryEngine
-
findIds
public <A> List<A> findIds(OrmQueryRequest<?> request)
Description copied from interface:OrmQueryEngine
Execute the find id's query.- Specified by:
findIds
in interfaceOrmQueryEngine
-
findSingleAttributeList
public <A> List<A> findSingleAttributeList(OrmQueryRequest<?> request)
Description copied from interface:OrmQueryEngine
Execute the findSingleAttributeList query.- Specified by:
findSingleAttributeList
in interfaceOrmQueryEngine
-
findIterate
public <T> QueryIterator<T> findIterate(OrmQueryRequest<T> request)
Description copied from interface:OrmQueryEngine
Execute the query using a QueryIterator.- Specified by:
findIterate
in interfaceOrmQueryEngine
-
findVersions
public <T> List<Version<T>> findVersions(OrmQueryRequest<T> request)
Description copied from interface:OrmQueryEngine
Execute the findVersions query.- Specified by:
findVersions
in interfaceOrmQueryEngine
-
findMany
public <T> BeanCollection<T> findMany(OrmQueryRequest<T> request)
Description copied from interface:OrmQueryEngine
Execute the findList, findSet, findMap query returning an appropriate BeanCollection.- Specified by:
findMany
in interfaceOrmQueryEngine
-
findId
public <T> T findId(OrmQueryRequest<T> request)
Find a single bean using its unique id.- Specified by:
findId
in interfaceOrmQueryEngine
-
-