Class WorkExecutor<T>

  • public class WorkExecutor<T>
    extends Object
    A visitor used for executing a discrete piece of work encapsulated in a Work or ReturningWork instance.
    • Constructor Detail

      • WorkExecutor

        public WorkExecutor()
    • Method Detail

      • executeWork

        public @Nullable T executeWork​(Work work,
                                       Connection connection)
                                throws SQLException
        Execute the discrete work encapsulated by a Work instance using the supplied connection.

        Because Work does not return a value when executed via Work.execute(Connection), this method always returns null.

        work - The ReturningWork instance encapsulating the discrete work
        connection - The connection on which to perform the work.
        SQLException - Thrown during execution of the underlying JDBC interaction.
        HibernateException - Generally indicates a wrapped SQLException.