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:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass[]
Accessor for the java types of the datastore columns.int[]
toDatastoreType
(Color memberValue) Method to convert the passed member value to the datastore type.toMemberType
(int[] datastoreValue) Method to convert the passed datastore value to the member type.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
ColorComponentsConverter
public ColorComponentsConverter()
-
-
Method Details
-
toDatastoreType
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
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
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
-