org.kuali.rice.krad.data.jpa.converters
Class Boolean01BigDecimalConverter

java.lang.Object
  extended by org.kuali.rice.krad.data.jpa.converters.Boolean01BigDecimalConverter
All Implemented Interfaces:
javax.persistence.AttributeConverter<Boolean,BigDecimal>

public class Boolean01BigDecimalConverter
extends Object
implements javax.persistence.AttributeConverter<Boolean,BigDecimal>

Converts values of 0 or 1 to and from false or true where the field is stored as a Decimal numeric type.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
Boolean01BigDecimalConverter()
           
 
Method Summary
 BigDecimal convertToDatabaseColumn(Boolean objectValue)
           This implementation will convert from a false or true value to a 0 or 1 Decimal numeric type value.
 Boolean convertToEntityAttribute(BigDecimal dataValue)
           This implementation will convert from a 0 or 1 Decimal numeric type value to a false or true value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Boolean01BigDecimalConverter

public Boolean01BigDecimalConverter()
Method Detail

convertToDatabaseColumn

public BigDecimal convertToDatabaseColumn(Boolean objectValue)
This implementation will convert from a false or true value to a 0 or 1 Decimal numeric type value.

Specified by:
convertToDatabaseColumn in interface javax.persistence.AttributeConverter<Boolean,BigDecimal>

convertToEntityAttribute

public Boolean convertToEntityAttribute(BigDecimal dataValue)
This implementation will convert from a 0 or 1 Decimal numeric type value to a false or true value.

Specified by:
convertToEntityAttribute in interface javax.persistence.AttributeConverter<Boolean,BigDecimal>


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.