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.

### Nested Class Summary

### Nested classes/interfaces inherited from class org.h2.value.Value

`Value.ValueBlob, Value.ValueClob`

### Field Summary

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

`hash, value`

### 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, TIMESTAMP_TZ, TIMESTAMP_UTC, TYPE_COUNT, UNKNOWN, UUID`

### 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.
`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, compareTo, compareTypeSafe, convertScale, convertTo, copy, copyToResult, copyToTemp, divide, getBigDecimal, getBoolean, getByte, getDate, getDouble, getFloat, getHigherOrder, getInputStream, getInt, getLong, getReader, getResultSet, getScale, getShort, getSignum, getSmall, getTableId, getTime, getTimestamp, getTraceSQL, isLinkedToTable, modulus, multiply, negate, remove, subtract, throwUnsupportedExceptionForType, toString`

### 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 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 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