public class BooleanYNConverter extends Object implements javax.persistence.AttributeConverter<Boolean,String>
The conversion treats the values as follows: "Y", "y", "true", and "TRUE" are all true and "N" is false.
Modifier and Type | Field and Description |
---|---|
protected static Set<String> |
YES_VALUES
Defines the set of values that all correspond to yes.
|
Constructor and Description |
---|
BooleanYNConverter() |
Modifier and Type | Method and Description |
---|---|
String |
convertToDatabaseColumn(Boolean objectValue)
This implementation will convert from a false or true value to an "N" or "Y" value.
|
Boolean |
convertToEntityAttribute(String dataValue)
This implementation will convert from a "F" or any of the yes values to a false or true.
|
protected static final Set<String> YES_VALUES
public BooleanYNConverter()
public String convertToDatabaseColumn(Boolean objectValue)
public Boolean convertToEntityAttribute(String dataValue)
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.