org.h2.value

## Class ValueJavaObject

- java.lang.Object
- - org.h2.value.VersionedValue
  - - org.h2.value.Value
    - - org.h2.value.ValueBytes
      - - org.h2.value.ValueJavaObject

    public class ValueJavaObject
    extends ValueBytes

Implementation of the OBJECT data type.

### Field Summary

### Fields inherited from class org.h2.value.ValueBytes

`hash, type, value`

### Fields inherited from class org.h2.value.Value

`ARRAY, BLOB, BOOLEAN, BYTE, BYTES, CLOB, DATE, DECIMAL, DOUBLE, ENUM, FLOAT, GEOMETRY, INT, INTERVAL_DAY, INTERVAL_DAY_TO_HOUR, INTERVAL_DAY_TO_MINUTE, INTERVAL_DAY_TO_SECOND, INTERVAL_HOUR, INTERVAL_HOUR_TO_MINUTE, INTERVAL_HOUR_TO_SECOND, INTERVAL_MINUTE, INTERVAL_MINUTE_TO_SECOND, INTERVAL_MONTH, INTERVAL_SECOND, INTERVAL_YEAR, INTERVAL_YEAR_TO_MONTH, JAVA_OBJECT, LONG, MIN_LONG_DECIMAL, NULL, RESULT_SET, ROW, SHORT, STRING, STRING_FIXED, STRING_IGNORECASE, TIME, TIMESTAMP, TIMESTAMP_TZ, TYPE_COUNT, UNKNOWN, UUID`

### Fields inherited from class org.h2.value.VersionedValue

`DUMMY`

### Constructor Summary

Constructors
`protected` `ValueJavaObject(byte[] v, DataHandler dataHandler)`

### Method Summary

Methods
`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.
`TypeInfo` `getType()` Returns the data type.
`int` `getValueType()` 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

`compareTypeSafe, convertPrecision, equals, get, getBytes, getBytesNoCopy, getMemory, getNoCopy, getObject, getSQL, getString, hashCode`

### Methods inherited from class org.h2.value.Value

`add, checkPrecision, clearCache, compareTo, compareWithNull, containsNull, convertScale, convertTo, convertTo, convertTo, convertTo, convertToInt, copy, copyToResult, copyToTemp, divide, getBigDecimal, getBoolean, getByte, getDate, getDouble, getFloat, getHigherOrder, getHigherType, getInputStream, getInputStream, getInt, getLong, getReader, getReader, getResult, getShort, getSignum, getSmall, getSQL, getTableId, getTime, getTimestamp, getTraceSQL, getUnsupportedExceptionForOperation, isLinkedToTable, modulus, multiply, negate, remove, subtract, toString`

### Methods inherited from class org.h2.value.VersionedValue

`getCommittedValue, getCurrentValue, getOperationId, isCommitted`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ValueJavaObject

    protected ValueJavaObject(byte[] v,
                   DataHandler dataHandler)

### Method Detail

#### 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 object
  `b` - the byte array
  `dataHandler` - provides the object serializer
Returns:
  the value

#### getType

    public TypeInfo getType()

Description copied from class: `Value`
Returns the data type.

Overrides:
  `getType` in class `ValueBytes`
Returns:
  the data type

#### getValueType

    public int getValueType()

Description copied from class: `Value`
Get the value type.

Overrides:
  `getValueType` in class `ValueBytes`
Returns:
  the value 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 statement
  `parameterIndex` - 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