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 TypeMethodDescriptiongetArray()
Gets an array from the underlying result set.Gets a BigDecimal from the underlying result set.getBlob()
Gets a Blob from the underlying result set.boolean
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.getClob()
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.getDate()
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
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.Gets an Object from the underlying result set.Gets an Object from the underlying result set using a Map.getRef()
Gets a Ref from the underlying result set.Returns the underlying ResultSet...be careful!short
getShort()
Gets a short from the underlying result set.Gets a String from the underlying result set.getTime()
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.getTimestamp
(Calendar cal) Gets a Timestamp from the underlying result set.getURL()
Gets a URL from the underlying result set.boolean
wasNull()
Tells if the field was null.
-
Method Details
-
getArray
Gets an array from the underlying result set.- Returns:
- - the array
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getBigDecimal
Gets a BigDecimal from the underlying result set.- Returns:
- - the BigDecimal
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getBlob
Gets a Blob from the underlying result set.- Returns:
- - the Blob
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getBoolean
Gets a boolean from the underlying result set.- Returns:
- - the boolean
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getByte
Gets a byte from the underlying result set.- Returns:
- - the byte
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getBytes
Gets a byte[] from the underlying result set.- Returns:
- - the byte[]
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getClob
Gets a Clob from the underlying result set.- Returns:
- - the Clob
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getDate
Gets a Date from the underlying result set.- Returns:
- - the Date
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getDate
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
Gets a double from the underlying result set.- Returns:
- - the double
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getFloat
Gets a float from the underlying result set.- Returns:
- - the float
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getInt
Gets an int from the underlying result set.- Returns:
- - the int
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getLong
Gets a long from the underlying result set.- Returns:
- - the long
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getObject
Gets an Object from the underlying result set.- Returns:
- - the Object
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getObject
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
Gets a Ref from the underlying result set.- Returns:
- - the Ref
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getShort
Gets a short from the underlying result set.- Returns:
- - the short
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getString
Gets a String from the underlying result set.- Returns:
- - the String
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getTime
Gets a Time from the underlying result set.- Returns:
- - the Time
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getTime
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
Gets a Timestamp from the underlying result set.- Returns:
- - the Timestamp
- Throws:
SQLException
- - if the underlying result set throws an exception
-
getTimestamp
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
Gets a URL from the underlying result set.- Returns:
- - the URL
- Throws:
SQLException
- - if the underlying result set throws an exception
-
wasNull
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 benull
in which case thegetColumnIndex
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 fromgetColumnName
is null.- Returns:
- the index of the column (if zero then use the column name)
-