Package org.apache.cayenne.access.types

## Interface ValueObjectType<V,​T>

- Type Parameters:
    `V` - type of user's custom object.
    `T` - type that custom object will be serialized to/from should be backed by appropriate `ExtendedType`.
  All Known Implementing Classes:
    `BigIntegerValueType`, `CharacterValueType`, `LocalDateTimeValueType`, `LocalDateValueType`, `LocalTimeValueType`, `UUIDValueType`

      public interface ValueObjectType<V,​T>

  Descriptor and serialization helper for custom value objects that can be safely stored in the DB. Lightweight alternative for the `ExtendedType`.
  Since:
    4.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `T` | `fromJavaObject​(V object)` |
    `Class<T>` | `getTargetType()` |
    `Class<V>` | `getValueType()` |
    `String` | `toCacheKey​(V object)` | Returned value should be same for objects that is logically equal.
    `V` | `toJavaObject​(T value)` |

- - ### Method Detail

    - #### getTargetType

          Class<T> getTargetType()

      Returns:
        base type used to serialize V objects to.

    - #### getValueType

          Class<V> getValueType()

      Returns:
        type of Objects described by this ValueObjectType.

    - #### toJavaObject

          V toJavaObject​(T value)

      Parameters:
        `value` - of type T
      Returns:
        java object

    - #### fromJavaObject

          T fromJavaObject​(V object)

      Parameters:
        `object` - java object
      Returns:
        value of type T

    - #### toCacheKey

          String toCacheKey​(V object)

      Returned value should be same for objects that is logically equal.
      Returns:
        String representation usable for cache.