Package org.hibernate.type
Class NumericBooleanConverter
java.lang.Object
org.hibernate.type.NumericBooleanConverter
- All Implemented Interfaces:
AttributeConverter<Boolean,,Integer> BasicValueConverter<Boolean,,Integer> StandardBooleanConverter<Integer>,StandardConverter<Boolean,Integer>
Handles conversion to/from
Boolean as 0 (false) or 1 (true)-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToDatabaseColumn(Boolean attribute) convertToEntityAttribute(Integer dbData) Descriptor for the Java type for the domain portion of this converterDescriptor for the Java type for the relational portion of this convertertoDomainValue(Integer relationalForm) Convert the relational form just retrieved from JDBC ResultSet into the domain form.toRelationalValue(Boolean domainForm) Convert the domain form into the relational form in preparation for storage into JDBC
-
Field Details
-
INSTANCE
Singleton access
-
-
Constructor Details
-
NumericBooleanConverter
public NumericBooleanConverter()
-
-
Method Details
-
convertToDatabaseColumn
- Specified by:
convertToDatabaseColumnin interfaceAttributeConverter<Boolean,Integer>
-
convertToEntityAttribute
- Specified by:
convertToEntityAttributein interfaceAttributeConverter<Boolean,Integer>
-
toDomainValue
Description copied from interface:BasicValueConverterConvert the relational form just retrieved from JDBC ResultSet into the domain form.- Specified by:
toDomainValuein interfaceBasicValueConverter<Boolean,Integer>
-
toRelationalValue
Description copied from interface:BasicValueConverterConvert the domain form into the relational form in preparation for storage into JDBC- Specified by:
toRelationalValuein interfaceBasicValueConverter<Boolean,Integer>
-
getDomainJavaType
Description copied from interface:BasicValueConverterDescriptor for the Java type for the domain portion of this converter- Specified by:
getDomainJavaTypein interfaceBasicValueConverter<Boolean,Integer>
-
getRelationalJavaType
Description copied from interface:BasicValueConverterDescriptor for the Java type for the relational portion of this converter- Specified by:
getRelationalJavaTypein interfaceBasicValueConverter<Boolean,Integer>
-