- 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 Integer
toDatastoreType(Boolean bool)
Method to convert the passed member value to the datastore type.Boolean
toMemberType(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:TypeConverter
Method to convert the passed datastore value to the member type.- Specified by:
toMemberType
in interfaceTypeConverter<Boolean,Integer>
- Parameters:
val
- Value from the datastore- Returns:
- Value for the member
-
toDatastoreType
public Integer toDatastoreType(Boolean bool)
Description copied from interface:TypeConverter
Method to convert the passed member value to the datastore type.- Specified by:
toDatastoreType
in interfaceTypeConverter<Boolean,Integer>
- Parameters:
bool
- Value from the member- Returns:
- Value for the datastore
-
-