Class Boolean01BigDecimalConverter

java.lang.Object
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 Details

    • Boolean01BigDecimalConverter

      public Boolean01BigDecimalConverter()
  • Method Details

    • 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>