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
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 aWorkExecutor
visitor for executing the discrete work encapsulated by this work instance using the supplied connection.
-
Constructor Details
-
AbstractWork
public AbstractWork()
-
-
Method Details
-
accept
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.
-