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

java.lang.Object
  extended by 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 Summary
BooleanTFConverter()
           
 
Method Summary
 String convertToDatabaseColumn(Boolean objectValue)
           This implementation will convert from a false or true value to an "F" or "T" value.
 Boolean convertToEntityAttribute(String dataValue)
           This implementation will convert from a "F" or "T" value to a false or true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanTFConverter

public BooleanTFConverter()
Method Detail

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>


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