org.dellroad.stuff.dao
Class TypedQueryCallback<T,R>
java.lang.Object
org.dellroad.stuff.dao.QueryCallback<R>
org.dellroad.stuff.dao.TypedQueryCallback<T,R>
- Type Parameters:
T - persistent instance typeR - query return type
- All Implemented Interfaces:
- JpaCallback<R>
- Direct Known Subclasses:
- AbstractDAO.DAOQueryListCallback, AbstractDAO.DAOQueryUniqueCallback, CriteriaCallback
public abstract class TypedQueryCallback<T,R>
- extends QueryCallback<R>
Helper class for building and executing JPA typed queries.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypedQueryCallback
public TypedQueryCallback()
executeQuery
protected final R executeQuery(Query query)
- Delegates to
executeQuery(TypedQuery).
- Specified by:
executeQuery in class QueryCallback<R>
buildQuery
protected abstract TypedQuery<T> buildQuery(EntityManager entityManager)
- Build the typed query.
- Specified by:
buildQuery in class QueryCallback<R>
executeQuery
protected abstract R executeQuery(TypedQuery<T> query)
- Execute the query.