Package org.hibernate.jdbc
Class AbstractWork
java.lang.Object
org.hibernate.jdbc.AbstractWork
- All Implemented Interfaces:
Work,WorkExecutorVisitable<Void>
- Direct Known Subclasses:
TemporaryTableHelper.TemporaryTableDropWork
An abstract implementation of
Work that accepts a WorkExecutor
visitor for executing a discrete piece of work.
This class is intended to be used for work that does not return a value when
executed.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept(WorkExecutor<Void> executor, Connection connection) Accepts aWorkExecutorvisitor for executing the discrete work encapsulated by this work instance using the supplied connection.
-
Constructor Details
-
AbstractWork
public AbstractWork()
-
-
Method Details
-
accept
Accepts aWorkExecutorvisitor for executing the discrete work encapsulated by this work instance using the supplied connection. BecauseWorkdoes not return a value when executed (viaWork.execute(Connection), this method always returns null.- Specified by:
acceptin interfaceWorkExecutorVisitable<Void>- Parameters:
executor- The visitor that executes the work.connection- The connection on which to perform the work.- Returns:
- null
- Throws:
SQLException- Thrown during execution of the underlying JDBC interaction.HibernateException- Generally indicates a wrapped SQLException.
-