com.ibatis.sqlmap.client.extensions
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
 Array getArray()
          Gets an array from the underlying result set
 BigDecimal getBigDecimal()
          Gets a BigDecimal from the underlying result set
 Blob getBlob()
          Gets a Blob from the underlying result set
 boolean getBoolean()
          Gets a boolean from the underlying result set
 byte getByte()
          Gets a byte from the underlying result set
 byte[] getBytes()
          Gets a byte[] from the underlying result set
 Clob getClob()
          Gets a Clob from the underlying result set
 int getColumnIndex()
          Returns the index of the column being got in the underlying ResultSet.
 String getColumnName()
          Returns the name of the column being got in the underlying ResultSet.
 Date getDate()
          Gets a Date from the underlying result set
 Date getDate(Calendar cal)
          Gets a Date from the underlying result set using a calendar
 double getDouble()
          Gets a double from the underlying result set
 float getFloat()
          Gets a float from the underlying result set
 int getInt()
          Gets an int from the underlying result set
 long getLong()
          Gets a long from the underlying result set
 Object getObject()
          Gets an Object from the underlying result set
 Object getObject(Map map)
          Gets an Object from the underlying result set using a Map
 Ref getRef()
          Gets a Ref from the underlying result set
 ResultSet getResultSet()
          Returns the underlying ResultSet...be careful!
 short getShort()
          Gets a short from the underlying result set
 String getString()
          Gets a String from the underlying result set
 Time getTime()
          Gets a Time from the underlying result set
 Time getTime(Calendar cal)
          Gets a Time from the underlying result set using a Calendar
 Timestamp getTimestamp()
          Gets a Timestamp from the underlying result set
 Timestamp getTimestamp(Calendar cal)
          Gets a Timestamp from the underlying result set
 URL getURL()
          Gets a URL from the underlying result set
 boolean wasNull()
          Tells if the field was null
 

Method Detail

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)


Copyright © 2010. All Rights Reserved.