|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.dao.JDBCTypeMapper
public final class JDBCTypeMapper
Utility class to perform Java Object to JDBC and JDBC to Java Object type mappings.
Constructor Summary | |
---|---|
JDBCTypeMapper()
|
Method Summary | |
---|---|
static int |
getSQLTypeForString(java.lang.String typeStr)
Return the int representing the SQL type for the given text description of the type. |
static int |
mapForSetObject(java.lang.Object obj)
Map given Object instances to JDBC types for setObject methods. |
static java.util.Date |
toJavaDate(java.sql.Date date)
Performs a conversion from java.sql.Date to java.util.Date. |
static java.util.Date |
toJavaDate(java.sql.Timestamp date)
Performs a conversion from java.sql.Timestamp to java.util.Date. |
static java.sql.Date |
toSQLDate(java.util.Date date)
Performs a conversion from java.util.Date to java.sql.Date. |
static java.sql.Timestamp |
toSQLTimestamp(java.util.Date date)
Performs a conversion from java.util.Date to java.sql.Timestamp. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JDBCTypeMapper()
Method Detail |
---|
public static int mapForSetObject(java.lang.Object obj)
obj
- Object instance to map.
public static int getSQLTypeForString(java.lang.String typeStr)
typeStr
- String containing SQL type name.
public static java.sql.Date toSQLDate(java.util.Date date)
date
- Date to convert.
public static java.sql.Timestamp toSQLTimestamp(java.util.Date date)
date
- Date to convert.
public static java.util.Date toJavaDate(java.sql.Date date)
date
- SQL date to convert.
public static java.util.Date toJavaDate(java.sql.Timestamp date)
date
- SQL timestamp to convert.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |