public class ClassMapping extends SingleFieldMapping
absFieldNumber, datastoreMappings, mmd, referenceMapping, roleForMember, storeMgr, table, type
Constructor and Description |
---|
ClassMapping() |
Modifier and Type | Method and Description |
---|---|
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)
Method to get the object from the datastore and convert to an object.
|
void |
initialize(org.datanucleus.metadata.AbstractMemberMetaData fmd,
Table table,
org.datanucleus.ClassLoaderResolver clr)
Initialize this JavaTypeMapping with the given DatastoreAdapter for the given FieldMetaData.
|
void |
setObject(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
Object value)
Method to set the object when updating the the datastore.
|
getBoolean, getByte, getChar, getDefaultLength, getDouble, getFloat, getInt, getLong, getShort, getString, getValidValues, prepareDatastoreMapping, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setString
addDatastoreMapping, equals, failureMessage, getAbsoluteFieldNumber, getColumnMetaDataForMember, getDatastoreMapping, getDatastoreMappings, getMemberMetaData, getNumberOfDatastoreMappings, getObject, getReferenceMapping, getRoleForMember, getStoreManager, getTable, getType, getValueForDatastoreMapping, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, representableAsStringLiteralInStatement, setAbsFieldNumber, setMemberMetaData, setObject, setReferenceMapping, setRoleForMember, setTable
public void initialize(org.datanucleus.metadata.AbstractMemberMetaData fmd, Table table, org.datanucleus.ClassLoaderResolver clr)
SingleFieldMapping
initialize
in class SingleFieldMapping
fmd
- FieldMetaData for the field to be mapped (if any)table
- The datastore container storing this mapping (if any)clr
- the ClassLoaderResolverpublic Class getJavaType()
JavaTypeMapping
getJavaType
in class JavaTypeMapping
public String getJavaTypeForDatastoreMapping(int index)
getJavaTypeForDatastoreMapping
in class SingleFieldMapping
index
- requested datastore field index.public void setObject(org.datanucleus.ExecutionContext ec, PreparedStatement ps, int[] exprIndex, Object value)
setObject
in class SingleFieldMapping
ec
- ExecutionContextps
- PreparedStatementexprIndex
- the position of the value in the statementvalue
- the valueSingleFieldMapping.setObject(org.datanucleus.ExecutionContext, PreparedStatement, int[], java.lang.Object)
public Object getObject(org.datanucleus.ExecutionContext ec, ResultSet resultSet, int[] exprIndex)
getObject
in class SingleFieldMapping
ec
- ExecutionContextresultSet
- ResultSetexprIndex
- the position of the value in the resultSingleFieldMapping.getObject(org.datanucleus.ExecutionContext, ResultSet, int[])
Copyright © 2017. All rights reserved.