public final class ValueToObjectConverter extends TraceObject
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Class<?> |
GEOMETRY_CLASS
The Geometry class.
|
ARRAY, BLOB, CALLABLE_STATEMENT, CLOB, CONNECTION, DATA_SOURCE, DATABASE_META_DATA, PARAMETER_META_DATA, PREPARED_STATEMENT, RESULT_SET, RESULT_SET_META_DATA, SAVEPOINT, SQLXML, STATEMENT, trace, XA_DATA_SOURCE, XID| Modifier and Type | Method and Description |
|---|---|
static java.lang.Class<?> |
getDefaultClass(int type,
boolean forJdbc)
Get the name of the Java class for the given value type.
|
static Value |
objectToValue(Session session,
java.lang.Object x,
int type)
Convert a Java object to a value.
|
static Value |
readValue(Session session,
JdbcResultSet rs,
int columnIndex)
Read a value from the given result set.
|
static java.lang.Object |
valueToDefaultArray(Value value,
JdbcConnection conn,
boolean forJdbc)
Converts the specified array value to array of default Java objects for
its type.
|
static java.lang.Object |
valueToDefaultObject(Value value,
JdbcConnection conn,
boolean forJdbc)
Converts the specified value to the default Java object for its type.
|
static <T> T |
valueToObject(java.lang.Class<T> type,
Value value,
JdbcConnection conn)
Converts the specified value to an object of the specified type.
|
debugCode, debugCodeAssign, debugCodeCall, debugCodeCall, debugCodeCall, getNextId, getTraceId, getTraceObjectName, isDebugEnabled, isInfoEnabled, logAndConvert, quote, quoteArray, quoteBigDecimal, quoteBytes, quoteDate, quoteIntArray, quoteMap, quoteTime, quoteTimestamp, setTrace, unsupportedpublic static final java.lang.Class<?> GEOMETRY_CLASS
public static Value objectToValue(Session session, java.lang.Object x, int type)
session - the sessionx - the valuetype - the suggested value type, or Value#UNKNOWNpublic static <T> T valueToObject(java.lang.Class<T> type,
Value value,
JdbcConnection conn)
T - the typetype - the classvalue - the valueconn - the connectionnullpublic static java.lang.Class<?> getDefaultClass(int type,
boolean forJdbc)
type - the value typeforJdbc - if true get class for JDBC layer, if false get
class for Java functions APIpublic static java.lang.Object valueToDefaultObject(Value value, JdbcConnection conn, boolean forJdbc)
value - the valueconn - the connectionforJdbc - if true perform conversion for JDBC layer, if
false perform conversion for Java functions APIpublic static java.lang.Object valueToDefaultArray(Value value, JdbcConnection conn, boolean forJdbc)
value - the array valueconn - the connectionforJdbc - if true perform conversion for JDBC layer, if
false perform conversion for Java functions APIpublic static Value readValue(Session session, JdbcResultSet rs, int columnIndex)
session - the sessionrs - the result setcolumnIndex - the column index (1-based)