Class ResultGetterImpl

java.lang.Object
com.ibatis.sqlmap.engine.type.ResultGetterImpl
All Implemented Interfaces:
ResultGetter

public class ResultGetterImpl extends Object implements ResultGetter
A ResultGetter implementation.
  • Constructor Details

    • ResultGetterImpl

      public ResultGetterImpl(ResultSet resultSet, int columnIndex)
      Creates an instance for a PreparedStatement and column index.
      Parameters:
      resultSet - - the result set
      columnIndex - - the column index
    • ResultGetterImpl

      public ResultGetterImpl(ResultSet resultSet, String columnName)
      Creates an instance for a PreparedStatement and column name.
      Parameters:
      resultSet - - the result set
      columnName - - the column index
  • Method Details

    • getArray

      public Array getArray() throws SQLException
      Description copied from interface: ResultGetter
      Gets an array from the underlying result set.
      Specified by:
      getArray in interface ResultGetter
      Returns:
      - the array
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getBigDecimal

      public BigDecimal getBigDecimal() throws SQLException
      Description copied from interface: ResultGetter
      Gets a BigDecimal from the underlying result set.
      Specified by:
      getBigDecimal in interface ResultGetter
      Returns:
      - the BigDecimal
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getBlob

      public Blob getBlob() throws SQLException
      Description copied from interface: ResultGetter
      Gets a Blob from the underlying result set.
      Specified by:
      getBlob in interface ResultGetter
      Returns:
      - the Blob
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getBoolean

      public boolean getBoolean() throws SQLException
      Description copied from interface: ResultGetter
      Gets a boolean from the underlying result set.
      Specified by:
      getBoolean in interface ResultGetter
      Returns:
      - the boolean
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getByte

      public byte getByte() throws SQLException
      Description copied from interface: ResultGetter
      Gets a byte from the underlying result set.
      Specified by:
      getByte in interface ResultGetter
      Returns:
      - the byte
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getBytes

      public byte[] getBytes() throws SQLException
      Description copied from interface: ResultGetter
      Gets a byte[] from the underlying result set.
      Specified by:
      getBytes in interface ResultGetter
      Returns:
      - the byte[]
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getClob

      public Clob getClob() throws SQLException
      Description copied from interface: ResultGetter
      Gets a Clob from the underlying result set.
      Specified by:
      getClob in interface ResultGetter
      Returns:
      - the Clob
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getDate

      public Date getDate() throws SQLException
      Description copied from interface: ResultGetter
      Gets a Date from the underlying result set.
      Specified by:
      getDate in interface ResultGetter
      Returns:
      - the Date
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getDate

      public Date getDate(Calendar cal) throws SQLException
      Description copied from interface: ResultGetter
      Gets a Date from the underlying result set using a calendar.
      Specified by:
      getDate in interface ResultGetter
      Parameters:
      cal - - the Calendar
      Returns:
      - the Date
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getDouble

      public double getDouble() throws SQLException
      Description copied from interface: ResultGetter
      Gets a double from the underlying result set.
      Specified by:
      getDouble in interface ResultGetter
      Returns:
      - the double
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getFloat

      public float getFloat() throws SQLException
      Description copied from interface: ResultGetter
      Gets a float from the underlying result set.
      Specified by:
      getFloat in interface ResultGetter
      Returns:
      - the float
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getInt

      public int getInt() throws SQLException
      Description copied from interface: ResultGetter
      Gets an int from the underlying result set.
      Specified by:
      getInt in interface ResultGetter
      Returns:
      - the int
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getLong

      public long getLong() throws SQLException
      Description copied from interface: ResultGetter
      Gets a long from the underlying result set.
      Specified by:
      getLong in interface ResultGetter
      Returns:
      - the long
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getObject

      public Object getObject() throws SQLException
      Description copied from interface: ResultGetter
      Gets an Object from the underlying result set.
      Specified by:
      getObject in interface ResultGetter
      Returns:
      - the Object
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getObject

      public Object getObject(Map map) throws SQLException
      Description copied from interface: ResultGetter
      Gets an Object from the underlying result set using a Map.
      Specified by:
      getObject in interface ResultGetter
      Parameters:
      map - - the Map
      Returns:
      - the Object
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getRef

      public Ref getRef() throws SQLException
      Description copied from interface: ResultGetter
      Gets a Ref from the underlying result set.
      Specified by:
      getRef in interface ResultGetter
      Returns:
      - the Ref
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getShort

      public short getShort() throws SQLException
      Description copied from interface: ResultGetter
      Gets a short from the underlying result set.
      Specified by:
      getShort in interface ResultGetter
      Returns:
      - the short
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getString

      public String getString() throws SQLException
      Description copied from interface: ResultGetter
      Gets a String from the underlying result set.
      Specified by:
      getString in interface ResultGetter
      Returns:
      - the String
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getTime

      public Time getTime() throws SQLException
      Description copied from interface: ResultGetter
      Gets a Time from the underlying result set.
      Specified by:
      getTime in interface ResultGetter
      Returns:
      - the Time
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getTime

      public Time getTime(Calendar cal) throws SQLException
      Description copied from interface: ResultGetter
      Gets a Time from the underlying result set using a Calendar.
      Specified by:
      getTime in interface ResultGetter
      Parameters:
      cal - - the Calendar
      Returns:
      - the Time
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getTimestamp

      public Timestamp getTimestamp() throws SQLException
      Description copied from interface: ResultGetter
      Gets a Timestamp from the underlying result set.
      Specified by:
      getTimestamp in interface ResultGetter
      Returns:
      - the Timestamp
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getTimestamp

      public Timestamp getTimestamp(Calendar cal) throws SQLException
      Description copied from interface: ResultGetter
      Gets a Timestamp from the underlying result set.
      Specified by:
      getTimestamp in interface ResultGetter
      Parameters:
      cal - - the Calendar
      Returns:
      - the Timestamp
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getURL

      public URL getURL() throws SQLException
      Description copied from interface: ResultGetter
      Gets a URL from the underlying result set.
      Specified by:
      getURL in interface ResultGetter
      Returns:
      - the URL
      Throws:
      SQLException - - if the underlying result set throws an exception
    • wasNull

      public boolean wasNull() throws SQLException
      Description copied from interface: ResultGetter
      Tells if the field was null.
      Specified by:
      wasNull in interface ResultGetter
      Returns:
      - true if it was null
      Throws:
      SQLException - - if the underlying result set throws an exception
    • getResultSet

      public ResultSet getResultSet()
      Description copied from interface: ResultGetter
      Returns the underlying ResultSet...be careful!
      Specified by:
      getResultSet in interface ResultGetter
      Returns:
      a ResultSet instance.
    • getColumnIndex

      public int getColumnIndex()
      Description copied from interface: ResultGetter
      Returns the index of the column being got in the underlying ResultSet. Only use this method if the value returned from getColumnName is null.
      Specified by:
      getColumnIndex in interface ResultGetter
      Returns:
      the index of the column (if zero then use the column name)
    • getColumnName

      public String getColumnName()
      Description copied from interface: ResultGetter
      Returns the name of the column being got in the underlying ResultSet. May be null in which case the getColumnIndex method should be used.
      Specified by:
      getColumnName in interface ResultGetter
      Returns:
      the column name (may be null)