Class ResultSetWork<R>

  • All Implemented Interfaces:
    ReturningWork<R>
    Direct Known Subclasses:
    AbstractSqlQuery.CountWork

    public abstract class ResultSetWork<R>
    extends Object
    implements ReturningWork<R>
    A work implementation that executes an SQL query on the connection, and returns a value that is picked by a subclass from the resulting ResultSet. This class needs to be subclassed and implementors should provide an implementation of the getResult(ResultSet) method. By 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
    Last modified
    $Date: 2014-06-10 13:27:02 +0200 (ti, 10 jun 2014) $
    • Constructor Detail

      • ResultSetWork

        public ResultSetWork​(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