com.ibatis.sqlmap.client.extensions

Interface ResultGetter

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
ArraygetArray()
Gets an array from the underlying result set
BigDecimalgetBigDecimal()
Gets a BigDecimal from the underlying result set
BlobgetBlob()
Gets a Blob from the underlying result set
booleangetBoolean()
Gets a boolean from the underlying result set
bytegetByte()
Gets a byte from the underlying result set
byte[]getBytes()
Gets a byte[] from the underlying result set
ClobgetClob()
Gets a Clob from the underlying result set
intgetColumnIndex()
Returns the index of the column being got in the underlying ResultSet.
StringgetColumnName()
Returns the name of the column being got in the underlying ResultSet.
DategetDate()
Gets a Date from the underlying result set
DategetDate(Calendar cal)
Gets a Date from the underlying result set using a calendar
doublegetDouble()
Gets a double from the underlying result set
floatgetFloat()
Gets a float from the underlying result set
intgetInt()
Gets an int from the underlying result set
longgetLong()
Gets a long from the underlying result set
ObjectgetObject()
Gets an Object from the underlying result set
ObjectgetObject(Map map)
Gets an Object from the underlying result set using a Map
RefgetRef()
Gets a Ref from the underlying result set
ResultSetgetResultSet()
Returns the underlying ResultSet...be careful!
shortgetShort()
Gets a short from the underlying result set
StringgetString()
Gets a String from the underlying result set
TimegetTime()
Gets a Time from the underlying result set
TimegetTime(Calendar cal)
Gets a Time from the underlying result set using a Calendar
TimestampgetTimestamp()
Gets a Timestamp from the underlying result set
TimestampgetTimestamp(Calendar cal)
Gets a Timestamp from the underlying result set
URLgetURL()
Gets a URL from the underlying result set
booleanwasNull()
Tells if the field was null

Method Detail

getArray

public Array getArray()
Gets an array from the underlying result set

Returns: - the array

Throws: SQLException - if the underlying result set throws an exception

getBigDecimal

public BigDecimal getBigDecimal()
Gets a BigDecimal from the underlying result set

Returns: - the BigDecimal

Throws: SQLException - if the underlying result set throws an exception

getBlob

public Blob getBlob()
Gets a Blob from the underlying result set

Returns: - the Blob

Throws: SQLException - if the underlying result set throws an exception

getBoolean

public boolean getBoolean()
Gets a boolean from the underlying result set

Returns: - the boolean

Throws: SQLException - if the underlying result set throws an exception

getByte

public byte getByte()
Gets a byte from the underlying result set

Returns: - the byte

Throws: SQLException - if the underlying result set throws an exception

getBytes

public byte[] getBytes()
Gets a byte[] from the underlying result set

Returns: - the byte[]

Throws: SQLException - if the underlying result set throws an exception

getClob

public Clob getClob()
Gets a Clob from the underlying result set

Returns: - the Clob

Throws: SQLException - if the underlying result set throws an exception

getColumnIndex

public 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)

getColumnName

public 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)

getDate

public Date getDate()
Gets a Date from the underlying result set

Returns: - the Date

Throws: SQLException - if the underlying result set throws an exception

getDate

public Date getDate(Calendar cal)
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

public double getDouble()
Gets a double from the underlying result set

Returns: - the double

Throws: SQLException - if the underlying result set throws an exception

getFloat

public float getFloat()
Gets a float from the underlying result set

Returns: - the float

Throws: SQLException - if the underlying result set throws an exception

getInt

public int getInt()
Gets an int from the underlying result set

Returns: - the int

Throws: SQLException - if the underlying result set throws an exception

getLong

public long getLong()
Gets a long from the underlying result set

Returns: - the long

Throws: SQLException - if the underlying result set throws an exception

getObject

public Object getObject()
Gets an Object from the underlying result set

Returns: - the Object

Throws: SQLException - if the underlying result set throws an exception

getObject

public Object getObject(Map map)
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

public Ref getRef()
Gets a Ref from the underlying result set

Returns: - the Ref

Throws: SQLException - if the underlying result set throws an exception

getResultSet

public ResultSet getResultSet()
Returns the underlying ResultSet...be careful!

Returns: a ResultSet instance.

getShort

public short getShort()
Gets a short from the underlying result set

Returns: - the short

Throws: SQLException - if the underlying result set throws an exception

getString

public String getString()
Gets a String from the underlying result set

Returns: - the String

Throws: SQLException - if the underlying result set throws an exception

getTime

public Time getTime()
Gets a Time from the underlying result set

Returns: - the Time

Throws: SQLException - if the underlying result set throws an exception

getTime

public Time getTime(Calendar cal)
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

public Timestamp getTimestamp()
Gets a Timestamp from the underlying result set

Returns: - the Timestamp

Throws: SQLException - if the underlying result set throws an exception

getTimestamp

public Timestamp getTimestamp(Calendar cal)
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

public URL getURL()
Gets a URL from the underlying result set

Returns: - the URL

Throws: SQLException - if the underlying result set throws an exception

wasNull

public boolean wasNull()
Tells if the field was null

Returns: - true if it was null

Throws: SQLException - if the underlying result set throws an exception

Copyright © 2011. All Rights Reserved.