Class BooleanIntegerConverter
- java.lang.Object
-
- org.datanucleus.store.types.converters.BooleanIntegerConverter
-
- All Implemented Interfaces:
Serializable,TypeConverter<Boolean,Integer>
public class BooleanIntegerConverter extends Object implements TypeConverter<Boolean,Integer>
Class to handle the conversion between java.lang.Boolean and an Integer (0, 1) form.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BooleanIntegerConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegertoDatastoreType(Boolean bool)Method to convert the passed member value to the datastore type.BooleantoMemberType(Integer val)Method to convert the passed datastore value to the member type.
-
-
-
Method Detail
-
toMemberType
public Boolean toMemberType(Integer val)
Description copied from interface:TypeConverterMethod to convert the passed datastore value to the member type.- Specified by:
toMemberTypein interfaceTypeConverter<Boolean,Integer>- Parameters:
val- Value from the datastore- Returns:
- Value for the member
-
toDatastoreType
public Integer toDatastoreType(Boolean bool)
Description copied from interface:TypeConverterMethod to convert the passed member value to the datastore type.- Specified by:
toDatastoreTypein interfaceTypeConverter<Boolean,Integer>- Parameters:
bool- Value from the member- Returns:
- Value for the datastore
-
-