Package org.hibernate.type
Class YesNoConverter
- java.lang.Object
-
- org.hibernate.type.CharBooleanConverter
-
- org.hibernate.type.YesNoConverter
-
- All Implemented Interfaces:
AttributeConverter<Boolean,Character>
,BasicValueConverter<Boolean,Character>
,StandardBooleanConverter<Character>
,StandardConverter<Boolean,Character>
public class YesNoConverter extends CharBooleanConverter
Handles conversion to/fromBoolean
as'Y'
or'N'
-
-
Field Summary
Fields Modifier and Type Field Description static YesNoConverter
INSTANCE
Singleton access
-
Constructor Summary
Constructors Constructor Description YesNoConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String[]
getValues()
Boolean
toDomainValue(Character relationalForm)
Convert the relational form just retrieved from JDBC ResultSet into the domain form.Character
toRelationalValue(Boolean domainForm)
Convert the domain form into the relational form in preparation for storage into JDBC-
Methods inherited from class org.hibernate.type.CharBooleanConverter
convertToDatabaseColumn, convertToEntityAttribute, getDomainJavaType, getRelationalJavaType
-
-
-
-
Field Detail
-
INSTANCE
public static final YesNoConverter INSTANCE
Singleton access
-
-
Method Detail
-
getValues
protected String[] getValues()
- Specified by:
getValues
in classCharBooleanConverter
-
toDomainValue
public Boolean toDomainValue(Character relationalForm)
Description copied from interface:BasicValueConverter
Convert the relational form just retrieved from JDBC ResultSet into the domain form.
-
toRelationalValue
public Character toRelationalValue(Boolean domainForm)
Description copied from interface:BasicValueConverter
Convert the domain form into the relational form in preparation for storage into JDBC
-
-