org.apache.cayenne.access.types

## Class PeriodValueType

- java.lang.Object
- - org.apache.cayenne.access.types.PeriodValueType

- All Implemented Interfaces:
    ValueObjectType<Period,String>

      public class PeriodValueType
      extends Object
      implements ValueObjectType<Period,String>

  Since:
    4.2

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PeriodValueType()`

  - ### Method Summary

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

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.cayenne.access.types.ValueObjectType

      `equals`

- - ### Constructor Detail

    - #### PeriodValueType

          public PeriodValueType()

  - ### Method Detail

    - #### getTargetType

          public Class<String> getTargetType()

      Specified by:
        `getTargetType` in interface `ValueObjectType<Period,String>`
      Returns:
        base type used to serialize V objects to.

    - #### getValueType

          public Class<Period> getValueType()

      Specified by:
        `getValueType` in interface `ValueObjectType<Period,String>`
      Returns:
        type of Objects described by this ValueObjectType.

    - #### toJavaObject

          public Period toJavaObject(String value)

      Specified by:
        `toJavaObject` in interface `ValueObjectType<Period,String>`
      Parameters:
        `value` - of type T
      Returns:
        java object

    - #### fromJavaObject

          public String fromJavaObject(Period object)

      Specified by:
        `fromJavaObject` in interface `ValueObjectType<Period,String>`
      Parameters:
        `object` - java object
      Returns:
        value of type T

    - #### toCacheKey

          public String toCacheKey(Period object)

      Description copied from interface: `ValueObjectType`
      Returned value should be same for objects that is logically equal.
      Specified by:
        `toCacheKey` in interface `ValueObjectType<Period,String>`
      Returns:
        String representation usable for cache.

Copyright © 2001–2021 Apache Cayenne. All rights reserved.