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
All Methods Instance Methods Concrete Methods 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)
-
-
-
Method Detail
-
getTargetType
public Class<BigDecimal> getTargetType()
- Specified by:
getTargetType
in interfaceValueObjectType<BigDecimal,BigDecimal>
- Returns:
- base type used to serialize V objects to.
-
getValueType
public Class<BigDecimal> getValueType()
- Specified by:
getValueType
in interfaceValueObjectType<BigDecimal,BigDecimal>
- Returns:
- type of Objects described by this ValueObjectType.
-
toJavaObject
public BigDecimal toJavaObject(BigDecimal value)
- Specified by:
toJavaObject
in interfaceValueObjectType<BigDecimal,BigDecimal>
- Parameters:
value
- of type T- Returns:
- java object
-
fromJavaObject
public BigDecimal fromJavaObject(BigDecimal object)
- Specified by:
fromJavaObject
in interfaceValueObjectType<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 interfaceValueObjectType<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 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
-
-