org.h2.value
Class ValueJavaObject
java.lang.Object
org.h2.value.Value
org.h2.value.ValueBytes
org.h2.value.ValueJavaObject
public class ValueJavaObject
- extends ValueBytes
Implementation of the OBJECT data type.
Fields inherited from class org.h2.value.Value |
ARRAY, BLOB, BOOLEAN, BYTE, BYTES, CLOB, DATE, DECIMAL, DOUBLE, FLOAT, GEOMETRY, INT, JAVA_OBJECT, LONG, NULL, RESULT_SET, SHORT, STRING, STRING_FIXED, STRING_IGNORECASE, TIME, TIMESTAMP, TYPE_COUNT, UNKNOWN, UUID |
Method Summary |
protected DataHandler |
getDataHandler()
Return the data handler for the values that support it
(actually only Java objects). |
static ValueJavaObject |
getNoCopy(java.lang.Object javaObject,
byte[] b,
DataHandler dataHandler)
Get or create a java object value for the given byte array. |
int |
getType()
Get the value type. |
void |
set(java.sql.PreparedStatement prep,
int parameterIndex)
Set the value as a parameter in a prepared statement. |
Methods inherited from class org.h2.value.ValueBytes |
compareSecure, convertPrecision, equals, get, getBytes, getBytesNoCopy, getDisplaySize, getMemory, getNoCopy, getObject, getPrecision, getSQL, getString, hashCode |
Methods inherited from class org.h2.value.Value |
add, checkPrecision, clearCache, close, compareTo, compareTypeSave, convertScale, convertTo, copyToTemp, divide, getBigDecimal, getBoolean, getByte, getDate, getDouble, getFloat, getHigherOrder, getInputStream, getInt, getLong, getReader, getResultSet, getScale, getShort, getSignum, getSmall, getTableId, getTime, getTimestamp, getTraceSQL, isLinked, link, modulus, multiply, negate, subtract, throwUnsupportedExceptionForType, toString, unlink |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ValueJavaObject
protected ValueJavaObject(byte[] v,
DataHandler dataHandler)
getNoCopy
public static ValueJavaObject getNoCopy(java.lang.Object javaObject,
byte[] b,
DataHandler dataHandler)
- Get or create a java object value for the given byte array.
Do not clone the data.
- Parameters:
javaObject
- the objectb
- the byte arraydataHandler
- provides the object serializer
- Returns:
- the value
getType
public int getType()
- Description copied from class:
Value
- Get the value type.
- Overrides:
getType
in class ValueBytes
- Returns:
- the type
set
public void set(java.sql.PreparedStatement prep,
int parameterIndex)
throws java.sql.SQLException
- Description copied from class:
Value
- Set the value as a parameter in a prepared statement.
- Overrides:
set
in class ValueBytes
- Parameters:
prep
- the prepared statementparameterIndex
- the parameter index
- Throws:
java.sql.SQLException
getDataHandler
protected DataHandler getDataHandler()
- Description copied from class:
Value
- Return the data handler for the values that support it
(actually only Java objects).
- Overrides:
getDataHandler
in class Value
- Returns:
- the data handler