Package org.hibernate.jdbc
Class AbstractWork
- java.lang.Object
-
- org.hibernate.jdbc.AbstractWork
-
- All Implemented Interfaces:
Work
,WorkExecutorVisitable<Void>
- Direct Known Subclasses:
TemporaryTableHelper.TemporaryTableCreationWork
,TemporaryTableHelper.TemporaryTableDropWork
public abstract class AbstractWork extends Object implements Work, WorkExecutorVisitable<Void>
An abstract implementation ofWork
that accepts aWorkExecutor
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 Constructor Description AbstractWork()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Void
accept(WorkExecutor<Void> executor, Connection connection)
Accepts aWorkExecutor
visitor for executing the discrete work encapsulated by this work instance using the supplied connection.
-
-
-
Method Detail
-
accept
public Void accept(WorkExecutor<Void> executor, Connection connection) throws SQLException
Accepts aWorkExecutor
visitor for executing the discrete work encapsulated by this work instance using the supplied connection. BecauseWork
does not return a value when executed (viaWork.execute(Connection)
, this method always returns null.- Specified by:
accept
in interfaceWorkExecutorVisitable<Void>
- Parameters:
connection
- The connection on which to perform the work.executor
- The visitor that executes the work.- Returns:
- null
- Throws:
SQLException
- Thrown during execution of the underlying JDBC interaction.HibernateException
- Generally indicates a wrapped SQLException.
-
-