Package org.apache.cayenne.access.types

# Class BigDecimalValueType

java.lang.Object
org.apache.cayenne.access.types.BigDecimalValueType

All Implemented Interfaces:
  `ValueObjectType<BigDecimal,BigDecimal>`

public class BigDecimalValueType extends Object implements ValueObjectType<BigDecimal,BigDecimal>

Since:
  4.2

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BigDecimalValueType()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(BigDecimal value1, BigDecimal value2)`
  Allows to use special logic to compare values for equality as in rare cases it is not suffice to use default equals() method.
  `BigDecimal`
  `fromJavaObject(BigDecimal object)`
  `Class<BigDecimal>`
  `getTargetType()`
  `Class<BigDecimal>`
  `getValueType()`
  `String`
  `toCacheKey(BigDecimal object)`
  Returned value should be same for objects that is logically equal.
  `BigDecimal`
  `toJavaObject(BigDecimal value)`

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

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

- ## Constructor Details

  - ### BigDecimalValueType

    public BigDecimalValueType()

- ## Method Details

  - ### getTargetType

    public Class<BigDecimal> getTargetType()
    Specified by:
      `getTargetType` in interface `ValueObjectType<BigDecimal,BigDecimal>`
    Returns:
      base type used to serialize V objects to.

  - ### getValueType

    public Class<BigDecimal> getValueType()
    Specified by:
      `getValueType` in interface `ValueObjectType<BigDecimal,BigDecimal>`
    Returns:
      type of Objects described by this ValueObjectType.

  - ### toJavaObject

    public BigDecimal toJavaObject(BigDecimal value)
    Specified by:
      `toJavaObject` in interface `ValueObjectType<BigDecimal,BigDecimal>`
    Parameters:
      `value` - of type T
    Returns:
      java object

  - ### fromJavaObject

    public BigDecimal fromJavaObject(BigDecimal object)
    Specified by:
      `fromJavaObject` in interface `ValueObjectType<BigDecimal,BigDecimal>`
    Parameters:
      `object` - java object
    Returns:
      value of type T

  - ### toCacheKey

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

  - ### equals

    public boolean equals(BigDecimal value1, BigDecimal value2)
    Description copied from interface: `ValueObjectType`
    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.
    Specified by:
      `equals` in interface `ValueObjectType<BigDecimal,BigDecimal>`
    Parameters:
      `value1` - to compare
      `value2` - to compare
    Returns:
      true if given values are equal