Package org.hibernate.jdbc
Class AbstractWork
- java.lang.Object
-
- org.hibernate.jdbc.AbstractWork
-
- All Implemented Interfaces:
Work
,WorkExecutorVisitable<java.lang.Void>
public abstract class AbstractWork extends java.lang.Object implements Work, WorkExecutorVisitable<java.lang.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 java.lang.Void
accept(WorkExecutor<java.lang.Void> executor, java.sql.Connection connection)
Accepts aWorkExecutor
visitor for executing the discrete work encapsulated by this work instance using the supplied connection.
-
-
-
Method Detail
-
accept
public java.lang.Void accept(WorkExecutor<java.lang.Void> executor, java.sql.Connection connection) throws java.sql.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(java.sql.Connection)
, this method always returns null.- Specified by:
accept
in interfaceWorkExecutorVisitable<java.lang.Void>
- Parameters:
connection
- The connection on which to perform the work.executor
- The visitor that executes the work.- Returns:
- null
- Throws:
java.sql.SQLException
- Thrown during execution of the underlying JDBC interaction.HibernateException
- Generally indicates a wrapped SQLException.
-
-