Interface ValueObjectType<V,​T>

    • 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.
      • equals

        default boolean equals​(V value1,
                               V value2)
        Allows to use special logic to compare values for equality as in rare cases it is not suffice to use default equals() method. Default implementation uses Objects.equals(Object, Object) method.
        Parameters:
        value1 - to compare
        value2 - to compare
        Returns:
        true if given values are equal