Package com.ibatis.sqlmap.engine.type
Class ResultGetterImpl
java.lang.Object
com.ibatis.sqlmap.engine.type.ResultGetterImpl
- All Implemented Interfaces:
ResultGetter
A ResultGetter implementation.
-
Constructor Summary
ConstructorsConstructorDescriptionResultGetterImpl(ResultSet resultSet, int columnIndex) Creates an instance for a PreparedStatement and column index.ResultGetterImpl(ResultSet resultSet, String columnName) Creates an instance for a PreparedStatement and column name. -
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.booleanGets 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.getClob()Gets a Clob from the underlying result set.intReturns 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.doubleGets 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.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!shortgetShort()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.booleanwasNull()Tells if the field was null.
-
Constructor Details
-
ResultGetterImpl
Creates an instance for a PreparedStatement and column index.- Parameters:
resultSet- - the result setcolumnIndex- - the column index
-
ResultGetterImpl
Creates an instance for a PreparedStatement and column name.- Parameters:
resultSet- - the result setcolumnName- - the column index
-
-
Method Details
-
getArray
Description copied from interface:ResultGetterGets an array from the underlying result set.- Specified by:
getArrayin interfaceResultGetter- Returns:
- - the array
- Throws:
SQLException- - if the underlying result set throws an exception
-
getBigDecimal
Description copied from interface:ResultGetterGets a BigDecimal from the underlying result set.- Specified by:
getBigDecimalin interfaceResultGetter- Returns:
- - the BigDecimal
- Throws:
SQLException- - if the underlying result set throws an exception
-
getBlob
Description copied from interface:ResultGetterGets a Blob from the underlying result set.- Specified by:
getBlobin interfaceResultGetter- Returns:
- - the Blob
- Throws:
SQLException- - if the underlying result set throws an exception
-
getBoolean
Description copied from interface:ResultGetterGets a boolean from the underlying result set.- Specified by:
getBooleanin interfaceResultGetter- Returns:
- - the boolean
- Throws:
SQLException- - if the underlying result set throws an exception
-
getByte
Description copied from interface:ResultGetterGets a byte from the underlying result set.- Specified by:
getBytein interfaceResultGetter- Returns:
- - the byte
- Throws:
SQLException- - if the underlying result set throws an exception
-
getBytes
Description copied from interface:ResultGetterGets a byte[] from the underlying result set.- Specified by:
getBytesin interfaceResultGetter- Returns:
- - the byte[]
- Throws:
SQLException- - if the underlying result set throws an exception
-
getClob
Description copied from interface:ResultGetterGets a Clob from the underlying result set.- Specified by:
getClobin interfaceResultGetter- Returns:
- - the Clob
- Throws:
SQLException- - if the underlying result set throws an exception
-
getDate
Description copied from interface:ResultGetterGets a Date from the underlying result set.- Specified by:
getDatein interfaceResultGetter- Returns:
- - the Date
- Throws:
SQLException- - if the underlying result set throws an exception
-
getDate
Description copied from interface:ResultGetterGets a Date from the underlying result set using a calendar.- Specified by:
getDatein interfaceResultGetter- Parameters:
cal- - the Calendar- Returns:
- - the Date
- Throws:
SQLException- - if the underlying result set throws an exception
-
getDouble
Description copied from interface:ResultGetterGets a double from the underlying result set.- Specified by:
getDoublein interfaceResultGetter- Returns:
- - the double
- Throws:
SQLException- - if the underlying result set throws an exception
-
getFloat
Description copied from interface:ResultGetterGets a float from the underlying result set.- Specified by:
getFloatin interfaceResultGetter- Returns:
- - the float
- Throws:
SQLException- - if the underlying result set throws an exception
-
getInt
Description copied from interface:ResultGetterGets an int from the underlying result set.- Specified by:
getIntin interfaceResultGetter- Returns:
- - the int
- Throws:
SQLException- - if the underlying result set throws an exception
-
getLong
Description copied from interface:ResultGetterGets a long from the underlying result set.- Specified by:
getLongin interfaceResultGetter- Returns:
- - the long
- Throws:
SQLException- - if the underlying result set throws an exception
-
getObject
Description copied from interface:ResultGetterGets an Object from the underlying result set.- Specified by:
getObjectin interfaceResultGetter- Returns:
- - the Object
- Throws:
SQLException- - if the underlying result set throws an exception
-
getObject
Description copied from interface:ResultGetterGets an Object from the underlying result set using a Map.- Specified by:
getObjectin interfaceResultGetter- Parameters:
map- - the Map- Returns:
- - the Object
- Throws:
SQLException- - if the underlying result set throws an exception
-
getRef
Description copied from interface:ResultGetterGets a Ref from the underlying result set.- Specified by:
getRefin interfaceResultGetter- Returns:
- - the Ref
- Throws:
SQLException- - if the underlying result set throws an exception
-
getShort
Description copied from interface:ResultGetterGets a short from the underlying result set.- Specified by:
getShortin interfaceResultGetter- Returns:
- - the short
- Throws:
SQLException- - if the underlying result set throws an exception
-
getString
Description copied from interface:ResultGetterGets a String from the underlying result set.- Specified by:
getStringin interfaceResultGetter- Returns:
- - the String
- Throws:
SQLException- - if the underlying result set throws an exception
-
getTime
Description copied from interface:ResultGetterGets a Time from the underlying result set.- Specified by:
getTimein interfaceResultGetter- Returns:
- - the Time
- Throws:
SQLException- - if the underlying result set throws an exception
-
getTime
Description copied from interface:ResultGetterGets a Time from the underlying result set using a Calendar.- Specified by:
getTimein interfaceResultGetter- Parameters:
cal- - the Calendar- Returns:
- - the Time
- Throws:
SQLException- - if the underlying result set throws an exception
-
getTimestamp
Description copied from interface:ResultGetterGets a Timestamp from the underlying result set.- Specified by:
getTimestampin interfaceResultGetter- Returns:
- - the Timestamp
- Throws:
SQLException- - if the underlying result set throws an exception
-
getTimestamp
Description copied from interface:ResultGetterGets a Timestamp from the underlying result set.- Specified by:
getTimestampin interfaceResultGetter- Parameters:
cal- - the Calendar- Returns:
- - the Timestamp
- Throws:
SQLException- - if the underlying result set throws an exception
-
getURL
Description copied from interface:ResultGetterGets a URL from the underlying result set.- Specified by:
getURLin interfaceResultGetter- Returns:
- - the URL
- Throws:
SQLException- - if the underlying result set throws an exception
-
wasNull
Description copied from interface:ResultGetterTells if the field was null.- Specified by:
wasNullin interfaceResultGetter- Returns:
- - true if it was null
- Throws:
SQLException- - if the underlying result set throws an exception
-
getResultSet
Description copied from interface:ResultGetterReturns the underlying ResultSet...be careful!- Specified by:
getResultSetin interfaceResultGetter- Returns:
- a ResultSet instance.
-
getColumnIndex
public int getColumnIndex()Description copied from interface:ResultGetterReturns the index of the column being got in the underlying ResultSet. Only use this method if the value returned fromgetColumnNameis null.- Specified by:
getColumnIndexin interfaceResultGetter- Returns:
- the index of the column (if zero then use the column name)
-
getColumnName
Description copied from interface:ResultGetterReturns the name of the column being got in the underlying ResultSet. May benullin which case thegetColumnIndexmethod should be used.- Specified by:
getColumnNamein interfaceResultGetter- Returns:
- the column name (may be null)
-