Class StringCallback

  • All Implemented Interfaces:
    APIResultSetCallback

    public class StringCallback
    extends Object
    implements APIResultSetCallback
    Use this callback if you have a query which selects 1 String column and the query returns 1 row (result). For example: select j.Description from Job j where j.UniqueId=1
    • Constructor Detail

      • StringCallback

        public StringCallback()
    • Method Detail

      • callback

        public boolean callback​(ResultSet rs,
                                ObjectGetter ignored)
                         throws SQLException
        Description copied from interface: APIResultSetCallback
        Invoked for each result, provided that the previous invocation returned true.
        Specified by:
        callback in interface APIResultSetCallback
        Parameters:
        rs - the result-set to process
        ignored - an object-getter with can be used to convert the result-set into one (or more) objects.
        Returns:
        true if this method should be invoked for the next result, false if subsequent results are to be discarded.
        Throws:
        SQLException - Exception thrown when a database-related error occurs
      • getResult

        public String getResult()
        Return the result read from the query.
        Returns:
        The result from the query