This interface matches the getXXX methods on java.sql.ResultSet. This means everyone satisfies getString and getObject; all of the numeric types, within the limits of representation, satisfy all of the numeric getXXX methods; all of the character types satisfy all of the getXXX methods except getBytes and getBinaryStream; all of the binary types satisfy getBytes and all of the getXXXStream methods; Date satisfies getDate and getTimestamp; Time satisfies getTime; and Timestamp satisfies all of the date/time getXXX methods. The "preferred" method (one that will always work, I presume) is the one that matches the type most closely. See the comments below for "preferences". See the JDBC guide for details.
This interface does not include the getXXXStream methods.
The preferred methods for JDBC are:
CHAR and VARCHAR - getString()
BIT - getBoolean()
TINYINT - getByte()
SMALLINT - getShort()
INTEGER - getInt()
BIGINT - getLong()
REAL - getFloat()
FLOAT and DOUBLE - getDouble()
DECIMAL and NUMERIC - getBigDecimal()
BINARY and VARBINARY - getBytes()
DATE - getDate()
TIME - getTime()
TIMESTAMP - getTimestamp()
No JDBC type corresponds to getObject(). Use this for user-defined types or to get the JDBC types as java Objects. All primitive types will be wrapped in their corresponding Object type, i.e. int will be wrapped in an Integer.
getStream()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|