org.hibernate.jdbc
Class AbstractWork
java.lang.Object
org.hibernate.jdbc.AbstractWork
- All Implemented Interfaces:
- Work, WorkExecutorVisitable<Void>
public abstract class AbstractWork
- extends Object
- implements Work, WorkExecutorVisitable<Void>
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.hibernate.jdbc.Work |
execute |
AbstractWork
public AbstractWork()
accept
public Void accept(WorkExecutor<Void> executor,
Connection connection)
throws SQLException
- Accepts a
WorkExecutor
visitor for executing the discrete work
encapsulated by this work instance using the supplied connection.
Because Work
does not return a value when executed
(via Work.execute(java.sql.Connection)
, this method
always returns null.
- Specified by:
accept
in interface WorkExecutorVisitable<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.
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.