Interface ResultGetter

All Known Implementing Classes:
ResultGetterImpl

public interface ResultGetter
Allows values to be retrieved from the underlying result set. TypeHandlerCallback implementations use this interface to get values that they can subsequently manipulate before having them returned. Each of these methods has a corresponding method on the ResultSet (or CallableStatement) class, the only difference being that there is no need to specify the column name or index with these methods.

NOTE: There is no need to implement this. The implementation will be passed into the TypeHandlerCallback automatically.

  • Method Summary

    Modifier and Type
    Method
    Description
    Gets an array from the underlying result set.
    Gets a BigDecimal from the underlying result set.
    Gets a Blob from the underlying result set.
    boolean
    Gets a boolean from the underlying result set.
    byte
    Gets a byte from the underlying result set.
    byte[]
    Gets a byte[] from the underlying result set.
    Gets a Clob from the underlying result set.
    int
    Returns the index of the column being got in the underlying ResultSet.
    Returns the name of the column being got in the underlying ResultSet.
    Gets a Date from the underlying result set.
    Gets a Date from the underlying result set using a calendar.
    double
    Gets a double from the underlying result set.
    float
    Gets a float from the underlying result set.
    int
    Gets an int from the underlying result set.
    long
    Gets a long from the underlying result set.
    Gets an Object from the underlying result set.
    Gets an Object from the underlying result set using a Map.
    Gets a Ref from the underlying result set.
    Returns the underlying ResultSet...be careful!
    short
    Gets a short from the underlying result set.
    Gets a String from the underlying result set.
    Gets a Time from the underlying result set.
    Gets a Time from the underlying result set using a Calendar.
    Gets a Timestamp from the underlying result set.
    Gets a Timestamp from the underlying result set.
    Gets a URL from the underlying result set.
    boolean
    Tells if the field was null.
  • Method Details

    • getArray

      Array getArray() throws SQLException
      Gets an array from the underlying result set.
      Returns:
      - the array
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getBigDecimal

      BigDecimal getBigDecimal() throws SQLException
      Gets a BigDecimal from the underlying result set.
      Returns:
      - the BigDecimal
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getBlob

      Blob getBlob() throws SQLException
      Gets a Blob from the underlying result set.
      Returns:
      - the Blob
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getBoolean

      boolean getBoolean() throws SQLException
      Gets a boolean from the underlying result set.
      Returns:
      - the boolean
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getByte

      byte getByte() throws SQLException
      Gets a byte from the underlying result set.
      Returns:
      - the byte
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getBytes

      byte[] getBytes() throws SQLException
      Gets a byte[] from the underlying result set.
      Returns:
      - the byte[]
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getClob

      Clob getClob() throws SQLException
      Gets a Clob from the underlying result set.
      Returns:
      - the Clob
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getDate

      Date getDate() throws SQLException
      Gets a Date from the underlying result set.
      Returns:
      - the Date
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getDate

      Date getDate(Calendar cal) throws SQLException
      Gets a Date from the underlying result set using a calendar.
      Parameters:
      cal - - the Calendar
      Returns:
      - the Date
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getDouble

      double getDouble() throws SQLException
      Gets a double from the underlying result set.
      Returns:
      - the double
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getFloat

      float getFloat() throws SQLException
      Gets a float from the underlying result set.
      Returns:
      - the float
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getInt

      int getInt() throws SQLException
      Gets an int from the underlying result set.
      Returns:
      - the int
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getLong

      long getLong() throws SQLException
      Gets a long from the underlying result set.
      Returns:
      - the long
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getObject

      Object getObject() throws SQLException
      Gets an Object from the underlying result set.
      Returns:
      - the Object
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getObject

      Object getObject(Map map) throws SQLException
      Gets an Object from the underlying result set using a Map.
      Parameters:
      map - - the Map
      Returns:
      - the Object
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getRef

      Ref getRef() throws SQLException
      Gets a Ref from the underlying result set.
      Returns:
      - the Ref
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getShort

      short getShort() throws SQLException
      Gets a short from the underlying result set.
      Returns:
      - the short
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getString

      String getString() throws SQLException
      Gets a String from the underlying result set.
      Returns:
      - the String
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getTime

      Time getTime() throws SQLException
      Gets a Time from the underlying result set.
      Returns:
      - the Time
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getTime

      Time getTime(Calendar cal) throws SQLException
      Gets a Time from the underlying result set using a Calendar.
      Parameters:
      cal - - the Calendar
      Returns:
      - the Time
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getTimestamp

      Timestamp getTimestamp() throws SQLException
      Gets a Timestamp from the underlying result set.
      Returns:
      - the Timestamp
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getTimestamp

      Timestamp getTimestamp(Calendar cal) throws SQLException
      Gets a Timestamp from the underlying result set.
      Parameters:
      cal - - the Calendar
      Returns:
      - the Timestamp
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getURL

      URL getURL() throws SQLException
      Gets a URL from the underlying result set.
      Returns:
      - the URL
      Throws:
      SQLException - - if the underlying result set throws an exception
    • wasNull

      boolean wasNull() throws SQLException
      Tells if the field was null.
      Returns:
      - true if it was null
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getResultSet

      ResultSet getResultSet()
      Returns the underlying ResultSet...be careful!
      Returns:
      a ResultSet instance.
    • getColumnName

      String getColumnName()
      Returns the name of the column being got in the underlying ResultSet. May be null in which case the getColumnIndex method should be used.
      Returns:
      the column name (may be null)
    • getColumnIndex

      int getColumnIndex()
      Returns the index of the column being got in the underlying ResultSet. Only use this method if the value returned from getColumnName is null.
      Returns:
      the index of the column (if zero then use the column name)