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