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.Color
toMemberType(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:TypeConverter
Method to convert the passed member value to the datastore type.- Specified by:
toDatastoreType
in interfaceTypeConverter<Color,int[]>
- Parameters:
memberValue
- Value from the member- Returns:
- Value for the datastore
-
toMemberType
public Color toMemberType(int[] datastoreValue)
Description copied from interface:TypeConverter
Method to convert the passed datastore value to the member type.- Specified by:
toMemberType
in interfaceTypeConverter<Color,int[]>
- Parameters:
datastoreValue
- Value from the datastore- Returns:
- Value for the member
-
getDatastoreColumnTypes
public Class[] getDatastoreColumnTypes()
Description copied from interface:MultiColumnConverter
Accessor for the java types of the datastore columns.- Specified by:
getDatastoreColumnTypes
in interfaceMultiColumnConverter
- Returns:
- The java types of the columns
-
-