public final class SQLTypeInfos
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static java.lang.Object |
getValue(java.sql.ResultSet rs,
int index,
int sqlType) |
Get value from given ResultSet at given index with given SQL type.
|
static int |
javaType2sqlTypeNum(java.lang.Class<?> javaType) |
Returns the SQL type from the specified Java type.
|
static void |
setValue(java.sql.PreparedStatement stmt,
int index,
java.lang.Object value,
int sqlType) |
Set given value on given PreparedStatement at given index with given SQL type.
|
static java.lang.Class<?> |
sqlTypeName2javaType(java.lang.String sqlTypeName) |
Returns the Java type for the given SQL type name.
|
static java.lang.Class<?> |
sqlTypeNum2javaType(int sqlTypeNum) |
Returns the Java type for the given SQL type.
|
static java.lang.String |
sqlTypeNum2sqlTypeName(int sqlTypeNum) |
Returns the SQL type name for the given SQL type number.
|
public static java.lang.Class<?> sqlTypeNum2javaType(int sqlTypeNum) throws MappingException
sqlTypeNum
- SQL type name (see JDBC API)MappingException
- The SQL type is not recognized.public static java.lang.String sqlTypeNum2sqlTypeName(int sqlTypeNum) throws MappingException
sqlTypeNum
- SQL type name (see JDBC API)MappingException
- The SQL type is not recognized.public static java.lang.Class<?> sqlTypeName2javaType(java.lang.String sqlTypeName) throws MappingException
sqlTypeName
- SQL type name (e.g. numeric).MappingException
- The SQL type is not recognized.public static int javaType2sqlTypeNum(java.lang.Class<?> javaType)
javaType
- The Java class of the SQL type.public static java.lang.Object getValue(java.sql.ResultSet rs, int index, int sqlType) throws java.sql.SQLException
rs
- The ResultSet to get the value from.index
- The index of the value in the ResultSet.sqlType
- The SQL type of the value.java.sql.SQLException
- If a database access error occurs.public static void setValue(java.sql.PreparedStatement stmt, int index, java.lang.Object value, int sqlType)
stmt
- The PreparedStatement to set value on.index
- The index of the value in the PreparedStatement.value
- The value to set.sqlType
- The SQL type of the value.Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com