Package org.apache.cayenne.access.types
Class BigDecimalValueType
java.lang.Object
org.apache.cayenne.access.types.BigDecimalValueType
- All Implemented Interfaces:
ValueObjectType<BigDecimal,
BigDecimal>
- Since:
- 4.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.fromJavaObject
(BigDecimal object) toCacheKey
(BigDecimal object) Returned value should be same for objects that is logically equal.toJavaObject
(BigDecimal value)
-
Constructor Details
-
BigDecimalValueType
public BigDecimalValueType()
-
-
Method Details
-
getTargetType
- Specified by:
getTargetType
in interfaceValueObjectType<BigDecimal,
BigDecimal> - Returns:
- base type used to serialize V objects to.
-
getValueType
- Specified by:
getValueType
in interfaceValueObjectType<BigDecimal,
BigDecimal> - Returns:
- type of Objects described by this ValueObjectType.
-
toJavaObject
- Specified by:
toJavaObject
in interfaceValueObjectType<BigDecimal,
BigDecimal> - Parameters:
value
- of type T- Returns:
- java object
-
fromJavaObject
- Specified by:
fromJavaObject
in interfaceValueObjectType<BigDecimal,
BigDecimal> - Parameters:
object
- java object- Returns:
- value of type T
-
toCacheKey
Description copied from interface:ValueObjectType
Returned value should be same for objects that is logically equal.- Specified by:
toCacheKey
in interfaceValueObjectType<BigDecimal,
BigDecimal> - Returns:
- String representation usable for cache.
-
equals
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 usesObjects.equals(Object, Object)
method.- Specified by:
equals
in interfaceValueObjectType<BigDecimal,
BigDecimal> - Parameters:
value1
- to comparevalue2
- to compare- Returns:
- true if given values are equal
-