org.dellroad.stuff.dao
Class AbstractDAO.DAOQueryUniqueCallback

java.lang.Object
  extended by org.dellroad.stuff.dao.QueryCallback<R>
      extended by org.dellroad.stuff.dao.TypedQueryCallback<T,T>
          extended by org.dellroad.stuff.dao.AbstractDAO.DAOQueryUniqueCallback
All Implemented Interfaces:
JpaCallback<T>
Enclosing class:
AbstractDAO<T>

protected abstract class AbstractDAO.DAOQueryUniqueCallback
extends TypedQueryCallback<T,T>

Convenience subclass of QueryCallback for use by DAO subclasses when returning a single persistent instance.

Returns null if instance is not found.


Constructor Summary
protected AbstractDAO.DAOQueryUniqueCallback()
           
 
Method Summary
protected  T executeQuery(TypedQuery<T> query)
          Execute the query.
 
Methods inherited from class org.dellroad.stuff.dao.TypedQueryCallback
buildQuery, executeQuery
 
Methods inherited from class org.dellroad.stuff.dao.QueryCallback
doInJpa
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDAO.DAOQueryUniqueCallback

protected AbstractDAO.DAOQueryUniqueCallback()
Method Detail

executeQuery

protected final T executeQuery(TypedQuery<T> query)
Description copied from class: TypedQueryCallback
Execute the query.

Specified by:
executeQuery in class TypedQueryCallback<T,T>