Class BooleanYNConverter
java.lang.Object
org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter
public class BooleanYNConverter
extends Object
implements javax.persistence.AttributeConverter<Boolean,String>
Converts true/false represented by a set of yes characters and the character "N" to and from true and false.
The conversion treats the values as follows: "Y", "y", "true", and "TRUE" are all true and "N" is false.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Field Summary
FieldsModifier and TypeFieldDescriptionDefines the set of values that all correspond to yes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToDatabaseColumn(Boolean objectValue) This implementation will convert from a false or true value to an "N" or "Y" value.convertToEntityAttribute(String dataValue) This implementation will convert from a "F" or any of the yes values to a false or true.
-
Field Details
-
YES_VALUES
Defines the set of values that all correspond to yes.
-
-
Constructor Details
-
BooleanYNConverter
public BooleanYNConverter()
-
-
Method Details
-
convertToDatabaseColumn
This implementation will convert from a false or true value to an "N" or "Y" value. -
convertToEntityAttribute
This implementation will convert from a "F" or any of the yes values to a false or true.
-