public abstract class AbstractWork extends java.lang.Object implements Work, WorkExecutorVisitable<java.lang.Void>
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 and Description |
|---|
AbstractWork() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Void |
accept(WorkExecutor<java.lang.Void> executor,
java.sql.Connection connection)
Accepts a
WorkExecutor visitor for executing the discrete work
encapsulated by this work instance using the supplied connection. |
public java.lang.Void accept(WorkExecutor<java.lang.Void> executor, java.sql.Connection connection) throws java.sql.SQLException
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.accept in interface WorkExecutorVisitable<java.lang.Void>connection - The connection on which to perform the work.executor - The visitor that executes the work.java.sql.SQLException - Thrown during execution of the underlying JDBC interaction.HibernateException - Generally indicates a wrapped SQLException.Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.