Package org.hibernate.jdbc
Class AbstractReturningWork<T>
java.lang.Object
org.hibernate.jdbc.AbstractReturningWork<T>
- All Implemented Interfaces:
ReturningWork<T>,WorkExecutorVisitable<T>
public abstract class AbstractReturningWork<T>
extends Object
implements ReturningWork<T>, WorkExecutorVisitable<T>
An abstract implementation of
ReturningWork that accepts a WorkExecutor
visitor for executing a discrete piece of work and returning a result.
This class is intended to be used for work that returns a value when executed.- Author:
- Gail Badner
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept(WorkExecutor<T> executor, Connection connection) Accepts aWorkExecutorvisitor for executing the discrete work encapsulated by this work instance using the supplied connection.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.jdbc.ReturningWork
execute
-
Constructor Details
-
AbstractReturningWork
public AbstractReturningWork()
-
-
Method Details
-
accept
Accepts aWorkExecutorvisitor for executing the discrete work encapsulated by this work instance using the supplied connection.- Specified by:
acceptin interfaceWorkExecutorVisitable<T>- Parameters:
executor- The visitor that executes the workconnection- The connection on which to perform the work.- Returns:
- the valued returned by
ReturningWork.execute(Connection). - Throws:
SQLException- Thrown during execution of the underlying JDBC interaction.HibernateException- Generally indicates a wrapped SQLException.
-