Class BooleanTFConverter

java.lang.Object
org.kuali.rice.krad.data.jpa.converters.BooleanTFConverter
All Implemented Interfaces:
javax.persistence.AttributeConverter<Boolean,String>

public class BooleanTFConverter extends Object implements javax.persistence.AttributeConverter<Boolean,String>
Converts true/false represented by the characters "T" and "F" to and from true and false.

The conversion treats the values as follows: "T" is true and "F" is false.

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

    • BooleanTFConverter

      public BooleanTFConverter()
  • Method Details

    • convertToDatabaseColumn

      public String convertToDatabaseColumn(Boolean objectValue)
      This implementation will convert from a false or true value to an "F" or "T" value.
      Specified by:
      convertToDatabaseColumn in interface javax.persistence.AttributeConverter<Boolean,String>
    • convertToEntityAttribute

      public Boolean convertToEntityAttribute(String dataValue)
      This implementation will convert from a "F" or "T" value to a false or true.
      Specified by:
      convertToEntityAttribute in interface javax.persistence.AttributeConverter<Boolean,String>