public class GregorianCalendarMapping extends SingleFieldMultiMapping
absFieldNumber, datastoreMappings, mmd, referenceMapping, roleForMember, storeMgr, table, type
Constructor and Description |
---|
GregorianCalendarMapping() |
Modifier and Type | Method and Description |
---|---|
protected void |
addColumns() |
Class |
getJavaType()
Accessor for the java type being mapped.
|
String |
getJavaTypeForDatastoreMapping(int index)
Accessor for the name of the java-type actually used when mapping the particular datastore field.
|
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 fmd,
Table table,
org.datanucleus.ClassLoaderResolver clr)
Initialize this JavaTypeMapping for the supplied table and 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, 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 fmd, Table table, org.datanucleus.ClassLoaderResolver clr)
JavaTypeMapping
initialize
in class JavaTypeMapping
fmd
- MetaData for the field/property to be mapped (if any)table
- The table 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 String getJavaTypeForDatastoreMapping(int index)
getJavaTypeForDatastoreMapping
in class SingleFieldMultiMapping
index
- requested datastore field index.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 © 2015. All rights reserved.