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 TypeMethodDescriptionbooleanequals(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:
getTargetTypein interfaceValueObjectType<BigDecimal,BigDecimal> - Returns:
- base type used to serialize V objects to.
-
getValueType
- Specified by:
getValueTypein interfaceValueObjectType<BigDecimal,BigDecimal> - Returns:
- type of Objects described by this ValueObjectType.
-
toJavaObject
- Specified by:
toJavaObjectin interfaceValueObjectType<BigDecimal,BigDecimal> - Parameters:
value- of type T- Returns:
- java object
-
fromJavaObject
- Specified by:
fromJavaObjectin interfaceValueObjectType<BigDecimal,BigDecimal> - Parameters:
object- java object- Returns:
- value of type T
-
toCacheKey
Description copied from interface:ValueObjectTypeReturned value should be same for objects that is logically equal.- Specified by:
toCacheKeyin interfaceValueObjectType<BigDecimal,BigDecimal> - Returns:
- String representation usable for cache.
-
equals
Description copied from interface:ValueObjectTypeAllows 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:
equalsin interfaceValueObjectType<BigDecimal,BigDecimal> - Parameters:
value1- to comparevalue2- to compare- Returns:
- true if given values are equal
-