Class ExecuteUpdateWork

  • All Implemented Interfaces:
    org.hibernate.jdbc.ReturningWork<Integer>

    public class ExecuteUpdateWork
    extends Object
    implements org.hibernate.jdbc.ReturningWork<Integer>
    A JDBC work implementation that executes an update/insert/delete query and returns the number of rows that was affected by the query. By subclassing this class and overridding the setParameters(PreparedStatement) method it is possible to set parameters on the prepared statement before the SQL is executed.
    Version:
    2.9
    Author:
    nicklas
    See Also:
    PreparedStatement.executeUpdate()
    Last modified
    $Date: 2014-06-10 13:27:02 +0200 (ti, 10 jun 2014) $
    • Constructor Detail

      • ExecuteUpdateWork

        public ExecuteUpdateWork​(SessionControl sc,
                                 String sql)
        Create a new work item.
        Parameters:
        sc - The session control to keep alive during the execution of the sql, or null
        sql - The sql to execute