public final class SQLTypeInfos extends Object
| Modifier and Type | Method and Description |
|---|---|
static Object |
getValue(ResultSet rs,
int index,
int sqlType)
Get value from given ResultSet at given index with given SQL type.
|
static int |
javaType2sqlTypeNum(Class<?> javaType)
Returns the SQL type from the specified Java type.
|
static void |
setValue(PreparedStatement stmt,
int index,
Object value,
int sqlType)
Set given value on given PreparedStatement at given index with given SQL type.
|
static Class<?> |
sqlTypeName2javaType(String sqlTypeName)
Returns the Java type for the given SQL type name.
|
static Class<?> |
sqlTypeNum2javaType(int sqlTypeNum)
Returns the Java type for the given SQL type.
|
static String |
sqlTypeNum2sqlTypeName(int sqlTypeNum)
Returns the SQL type name for the given SQL type number.
|
public static Class<?> sqlTypeNum2javaType(int sqlTypeNum) throws MappingException
sqlTypeNum - SQL type name (see JDBC API)MappingException - The SQL type is not recognized.public static String sqlTypeNum2sqlTypeName(int sqlTypeNum) throws MappingException
sqlTypeNum - SQL type name (see JDBC API)MappingException - The SQL type is not recognized.public static Class<?> sqlTypeName2javaType(String sqlTypeName) throws MappingException
sqlTypeName - SQL type name (e.g. numeric).MappingException - The SQL type is not recognized.public static int javaType2sqlTypeNum(Class<?> javaType)
javaType - The Java class of the SQL type.public static Object getValue(ResultSet rs, int index, int sqlType) throws 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.SQLException - If a database access error occurs.public static void setValue(PreparedStatement stmt, int index, 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.Copyright © 2014. All rights reserved.