类 WorkExecutor<T>
- java.lang.Object
-
- org.hibernate.jdbc.WorkExecutor<T>
-
public class WorkExecutor<T> extends Object
A visitor used for executing a discrete piece of work encapsulated in aWorkorReturningWorkinstance..- 作者:
- Gail Badner
-
-
构造器概要
构造器 构造器 说明 WorkExecutor()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 <T> TexecuteReturningWork(ReturningWork<T> work, Connection connection)Execute the discrete work encapsulated by aReturningWorkinstance using the supplied connection, returning the result ofReturningWork.execute(java.sql.Connection)<T> TexecuteWork(Work work, Connection connection)Execute the discrete work encapsulated by aWorkinstance using the supplied connection.
-
-
-
方法详细资料
-
executeWork
public <T> T executeWork(Work work, Connection connection) throws SQLException
Execute the discrete work encapsulated by aWorkinstance using the supplied connection. BecauseWorkdoes not return a value when executed (viaWork.execute(java.sql.Connection), this method always returns null.- 参数:
work- The @link ReturningWork} instance encapsulating the discrete workconnection- The connection on which to perform the work.- 返回:
- null.
- 抛出:
SQLException- Thrown during execution of the underlying JDBC interaction.HibernateException- Generally indicates a wrapped SQLException.
-
executeReturningWork
public <T> T executeReturningWork(ReturningWork<T> work, Connection connection) throws SQLException
Execute the discrete work encapsulated by aReturningWorkinstance using the supplied connection, returning the result ofReturningWork.execute(java.sql.Connection)- 参数:
work- The @link ReturningWork} instance encapsulating the discrete workconnection- The connection on which to perform the work.- 返回:
- the valued returned by
work.execute(connection). - 抛出:
SQLException- Thrown during execution of the underlying JDBC interaction.HibernateException- Generally indicates a wrapped SQLException.
-
-