public final class ValueToObjectConverter extends TraceObject
| 限定符和类型 | 字段和说明 |
|---|---|
static 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| 限定符和类型 | 方法和说明 |
|---|---|
static Class<?> |
getDefaultClass(int type,
boolean forJdbc)
Get the name of the Java class for the given value type.
|
static Value |
objectToValue(Session session,
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 Object |
valueToDefaultArray(Value value,
JdbcConnection conn,
boolean forJdbc)
Converts the specified array value to array of default Java objects for
its type.
|
static Object |
valueToDefaultObject(Value value,
JdbcConnection conn,
boolean forJdbc)
Converts the specified value to the default Java object for its type.
|
static <T> T |
valueToObject(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 Class<?> GEOMETRY_CLASS
public static Value objectToValue(Session session, Object x, int type)
session - the sessionx - the valuetype - the suggested value type, or Value#UNKNOWNpublic static <T> T valueToObject(Class<T> type, Value value, JdbcConnection conn)
T - the typetype - the classvalue - the valueconn - the connectionnullpublic static 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 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 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)Copyright © 2022. All rights reserved.