|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.mapped.mapping.JavaTypeMapping
org.datanucleus.store.mapped.mapping.SingleFieldMultiMapping
org.datanucleus.store.mapped.mapping.ColorMapping
public class ColorMapping
Mapping for java.awt.Color mapping the red, green, blue and alpha values to datastore fields.
| Field Summary |
|---|
| Fields inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping |
|---|
absFieldNumber, datastoreContainer, datastoreMappings, LOCALISER, mmd, referenceMapping, roleForMember, storeMgr, type |
| Constructor Summary | |
|---|---|
ColorMapping()
|
|
| Method Summary | |
|---|---|
protected void |
addDatastoreFields()
|
Class |
getJavaType()
Accessor for the java type being mapped. |
Object |
getObject(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
Object |
getValueForDatastoreMapping(NucleusContext nucleusCtx,
int index,
Object value)
Method to return the value to be stored in the specified datastore index given the overall value for this java type. |
void |
initialize(AbstractMemberMetaData mmd,
DatastoreContainerObject container,
ClassLoaderResolver clr)
Initialise this JavaTypeMapping with the given DatastoreAdapter for the given field/property MetaData. |
void |
initialize(MappedStoreManager storeMgr,
String type)
Initialize this JavaTypeMapping with the given StoreManager for the given type. |
void |
setObject(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
Object value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
| Methods inherited from class org.datanucleus.store.mapped.mapping.SingleFieldMultiMapping |
|---|
addDatastoreField, getJavaTypeForDatastoreMapping, hasSimpleDatastoreRepresentation |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColorMapping()
| Method Detail |
|---|
public void initialize(AbstractMemberMetaData mmd,
DatastoreContainerObject container,
ClassLoaderResolver clr)
initialize in class JavaTypeMappingmmd - Metadata for the field/property to be mapped (if any)container - The datastore container storing this mapping (if any)clr - the ClassLoaderResolver
public void initialize(MappedStoreManager storeMgr,
String type)
JavaTypeMapping
initialize in class JavaTypeMappingstoreMgr - The Datastore Adapter that this Mapping should use.type - The Class that this mapping maps to the database.MappingFactory.createMapping(Class, MappedStoreManager, String)protected void addDatastoreFields()
public Class getJavaType()
JavaTypeMapping
getJavaType in class JavaTypeMapping
public Object getValueForDatastoreMapping(NucleusContext nucleusCtx,
int index,
Object value)
getValueForDatastoreMapping in class JavaTypeMappingindex - The datastore indexvalue - The overall value for this java typenucleusCtx - Context
public void setObject(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
Object value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setObject in class JavaTypeMappingec - ExecutionContextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public Object getObject(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getObject in class JavaTypeMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||