public abstract class AbstractContainerMapping extends SingleFieldMapping
absFieldNumber, datastoreMappings, mmd, referenceMapping, roleForMember, storeMgr, table, type| Constructor and Description |
|---|
AbstractContainerMapping() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
containerIsStoredInSingleColumn()
Convenience method to return if the container (collection or map) is stored
in the owning table as a column.
|
DatastoreMapping |
getDatastoreMapping(int index)
Accessor for a datastore mapping
|
DatastoreMapping[] |
getDatastoreMappings()
Accessor for the datastore mappings for this java type
|
String |
getJavaTypeForDatastoreMapping(int index)
Accessor for the name of the java-type actually used when mapping the particular datastore
field.
|
int |
getNumberOfDatastoreMappings()
Accessor for the number of datastore fields
|
Object |
getObject(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
Method to retrieve an object from the passed JDBC ResultSet.
|
Table |
getTable()
Accessor for the datastore class.
|
boolean |
hasSimpleDatastoreRepresentation()
Whether the mapping has a simple (single column) datastore representation.
|
boolean |
includeInFetchStatement()
This mapping is included in the select statement.
|
boolean |
includeInInsertStatement()
This mapping is included in the insert statement.
|
boolean |
includeInUpdateStatement()
This mapping is included in the update statement.
|
void |
initialize(org.datanucleus.metadata.AbstractMemberMetaData mmd,
Table table,
org.datanucleus.ClassLoaderResolver clr)
Initialize this JavaTypeMapping for the given field/property.
|
void |
postFetch(org.datanucleus.state.ObjectProvider sm)
Method to be called after any fetch of the owner class element.
|
protected void |
prepareDatastoreMapping()
Method to prepare a field mapping for use in the datastore.
|
protected org.datanucleus.store.types.SCO |
replaceFieldWithWrapper(org.datanucleus.state.ObjectProvider op,
Object value)
Method to replace the field that this mapping represents with a SCO wrapper.
|
void |
setObject(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
Object value)
Method to set a field in the passed JDBC PreparedStatement using this mapping.
|
getBoolean, getByte, getChar, getDefaultLength, getDouble, getFloat, getInt, getLong, getShort, getString, getValidValues, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setStringaddDatastoreMapping, equals, failureMessage, getAbsoluteFieldNumber, getColumnMetaDataForMember, getJavaType, getMemberMetaData, getObject, getReferenceMapping, getRoleForMember, getStoreManager, getType, getValueForDatastoreMapping, hashCode, initialize, isNullable, isSerialised, representableAsStringLiteralInStatement, setAbsFieldNumber, setMemberMetaData, setObject, setReferenceMapping, setRoleForMember, setTablepublic void initialize(org.datanucleus.metadata.AbstractMemberMetaData mmd,
Table table,
org.datanucleus.ClassLoaderResolver clr)
initialize in class SingleFieldMappingmmd - MetaData for the field/property to be mapped (if any)table - The datastore container storing this mapping (if any)clr - the ClassLoaderResolverpublic boolean hasSimpleDatastoreRepresentation()
hasSimpleDatastoreRepresentation in class JavaTypeMappingprotected void prepareDatastoreMapping()
prepareDatastoreMapping in class SingleFieldMappingpublic String getJavaTypeForDatastoreMapping(int index)
getJavaTypeForDatastoreMapping in class SingleFieldMappingindex - requested datastore field index.public void setObject(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
Object value)
setObject in class SingleFieldMappingec - ExecutionContextps - The JDBC Prepared Statement to be populatedexprIndex - The parameter positions in the JDBC statement to populate.value - The value to populate into itpublic Object getObject(org.datanucleus.ExecutionContext ec, ResultSet resultSet, int[] exprIndex)
getObject in class SingleFieldMappingec - ExecutionContextresultSet - The ResultSetexprIndex - The parameter position(s) to extract the object frompublic Table getTable()
getTable in class JavaTypeMappingpublic int getNumberOfDatastoreMappings()
getNumberOfDatastoreMappings in class JavaTypeMappingpublic DatastoreMapping getDatastoreMapping(int index)
getDatastoreMapping in class JavaTypeMappingindex - The id of the mappingpublic DatastoreMapping[] getDatastoreMappings()
getDatastoreMappings in class JavaTypeMappingprotected boolean containerIsStoredInSingleColumn()
public boolean includeInFetchStatement()
includeInFetchStatement in class JavaTypeMappingpublic boolean includeInUpdateStatement()
includeInUpdateStatement in class JavaTypeMappingpublic boolean includeInInsertStatement()
includeInInsertStatement in class JavaTypeMappingprotected org.datanucleus.store.types.SCO replaceFieldWithWrapper(org.datanucleus.state.ObjectProvider op,
Object value)
op - ObjectProvider for the owning objectvalue - The value to create the wrapper withpublic void postFetch(org.datanucleus.state.ObjectProvider sm)
sm - StateManager of the ownerCopyright © 2017. All rights reserved.