public class ColorMapping extends SingleFieldMultiMapping
absFieldNumber, datastoreMappings, LOCALISER, LOCALISER_RDBMS, mmd, referenceMapping, roleForMember, storeMgr, table, type
Constructor and Description |
---|
ColorMapping() |
Modifier and Type | Method and Description |
---|---|
protected void |
addColumns() |
Class |
getJavaType()
Accessor for the java type being mapped.
|
Object |
getObject(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
Obtains a value from
datastoreResults
at position specified by exprIndex . |
Object |
getValueForDatastoreMapping(org.datanucleus.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(org.datanucleus.metadata.AbstractMemberMetaData mmd,
Table table,
org.datanucleus.ClassLoaderResolver clr)
Initialise this JavaTypeMapping with the given DatastoreAdapter for the given field/property MetaData.
|
void |
initialize(RDBMSStoreManager storeMgr,
String type)
Initialise this JavaTypeMapping with the given StoreManager for the given type.
|
void |
setObject(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
Object value)
Sets a
value into datastoreStatement
at position specified by exprIndex . |
addColumns, getJavaTypeForDatastoreMapping, hasSimpleDatastoreRepresentation
addDatastoreMapping, equals, failureMessage, getAbsoluteFieldNumber, getBoolean, getByte, getChar, getColumnMetaDataForMember, getDatastoreMapping, getDatastoreMappings, getDouble, getFloat, getInt, getLong, getMemberMetaData, getNumberOfDatastoreMappings, getObject, getReferenceMapping, getRoleForMember, getShort, getStoreManager, getString, getTable, getType, hashCode, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, isNullable, isSerialised, representableAsStringLiteralInStatement, setAbsFieldNumber, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setMemberMetaData, setObject, setReferenceMapping, setRoleForMember, setShort, setString, setTable
public void initialize(org.datanucleus.metadata.AbstractMemberMetaData mmd, Table table, org.datanucleus.ClassLoaderResolver clr)
initialize
in class JavaTypeMapping
mmd
- Metadata for the field/property to be mapped (if any)table
- The datastore container storing this mapping (if any)clr
- the ClassLoaderResolverpublic void initialize(RDBMSStoreManager storeMgr, String type)
JavaTypeMapping
initialize
in class JavaTypeMapping
storeMgr
- The Datastore Adapter that this Mapping should use.type
- The Class that this mapping maps to the database.protected void addColumns()
public Class getJavaType()
JavaTypeMapping
getJavaType
in class JavaTypeMapping
public Object getValueForDatastoreMapping(org.datanucleus.NucleusContext nucleusCtx, int index, Object value)
getValueForDatastoreMapping
in class JavaTypeMapping
index
- The datastore indexvalue
- The overall value for this java typenucleusCtx
- Contextpublic void setObject(org.datanucleus.ExecutionContext ec, PreparedStatement ps, int[] exprIndex, Object value)
JavaTypeMapping
value
into datastoreStatement
at position specified by exprIndex
.setObject
in class JavaTypeMapping
ec
- ExecutionContextps
- PreparedStatementexprIndex
- the position of the value in the statementvalue
- the valuepublic Object getObject(org.datanucleus.ExecutionContext ec, ResultSet resultSet, int[] exprIndex)
JavaTypeMapping
datastoreResults
at position specified by exprIndex
.getObject
in class JavaTypeMapping
ec
- ExecutionContextresultSet
- ResultSetexprIndex
- the position of the value in the resultCopyright © 2023. All rights reserved.