Class ColorComponentsConverter
- java.lang.Object
-
- org.datanucleus.store.types.converters.ColorComponentsConverter
-
- All Implemented Interfaces:
Serializable,MultiColumnConverter,TypeConverter<Color,int[]>
public class ColorComponentsConverter extends Object implements TypeConverter<Color,int[]>, MultiColumnConverter
TypeConverter for storing a java.awt.Color as its 4 components (red, green, blue, alpha).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ColorComponentsConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]getDatastoreColumnTypes()Accessor for the java types of the datastore columns.int[]toDatastoreType(Color memberValue)Method to convert the passed member value to the datastore type.ColortoMemberType(int[] datastoreValue)Method to convert the passed datastore value to the member type.
-
-
-
Method Detail
-
toDatastoreType
public int[] toDatastoreType(Color memberValue)
Description copied from interface:TypeConverterMethod to convert the passed member value to the datastore type.- Specified by:
toDatastoreTypein interfaceTypeConverter<Color,int[]>- Parameters:
memberValue- Value from the member- Returns:
- Value for the datastore
-
toMemberType
public Color toMemberType(int[] datastoreValue)
Description copied from interface:TypeConverterMethod to convert the passed datastore value to the member type.- Specified by:
toMemberTypein interfaceTypeConverter<Color,int[]>- Parameters:
datastoreValue- Value from the datastore- Returns:
- Value for the member
-
getDatastoreColumnTypes
public Class[] getDatastoreColumnTypes()
Description copied from interface:MultiColumnConverterAccessor for the java types of the datastore columns.- Specified by:
getDatastoreColumnTypesin interfaceMultiColumnConverter- Returns:
- The java types of the columns
-
-