|
||||||||||
| 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.MultiMapping
public abstract class MultiMapping
Mapping to represent multiple mappings within the single overall java type mapping. This mapping can be used to represent, for example,
| Field Summary | |
|---|---|
protected JavaTypeMapping[] |
javaTypeMappings
The Java mappings represented by this mapping. |
protected int |
numberOfDatastoreMappings
Number of datastore mappings - for convenience to improve performance |
| Fields inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping |
|---|
datastoreContainer, datastoreMappings, LOCALISER, mmd, referenceMapping, roleForMember, storeMgr, type |
| Constructor Summary | |
|---|---|
MultiMapping()
|
|
| Method Summary | |
|---|---|
void |
addJavaTypeMapping(JavaTypeMapping mapping)
Method to add a Java type mapping for a field |
DatastoreMapping |
getDatastoreMapping(int index)
Accessor for a datastore mapping. |
DatastoreMapping[] |
getDatastoreMappings()
Accessor for the datastore mappings for this java type |
JavaTypeMapping[] |
getJavaTypeMapping()
Accessor for the Java type mappings |
int |
getMappingNumberForValue(ObjectManager om,
java.lang.Object value)
Convenience accessor for the number of the java type mapping where the passed value would be stored. |
int |
getNumberOfDatastoreMappings()
Accessor for the number of datastore mappings. |
java.lang.Object |
getObject(ObjectManager om,
java.lang.Object rs,
int[] pos)
Method to retrieve an object of this type from the ResultSet. |
void |
setObject(ObjectManager om,
java.lang.Object ps,
int[] pos,
java.lang.Object value)
Method to set the parameters in the PreparedStatement with the fields of this object. |
void |
setObject(ObjectManager om,
java.lang.Object ps,
int[] pos,
java.lang.Object value,
StateManager ownerSM,
int ownerFieldNumber)
Sets the specified positions in the PreparedStatement associated with this field, and value. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected JavaTypeMapping[] javaTypeMappings
protected int numberOfDatastoreMappings
| Constructor Detail |
|---|
public MultiMapping()
| Method Detail |
|---|
public void addJavaTypeMapping(JavaTypeMapping mapping)
mapping - The mapping to addpublic JavaTypeMapping[] getJavaTypeMapping()
public int getNumberOfDatastoreMappings()
getNumberOfDatastoreMappings in class JavaTypeMappingpublic DatastoreMapping[] getDatastoreMappings()
JavaTypeMapping
getDatastoreMappings in class JavaTypeMappingpublic DatastoreMapping getDatastoreMapping(int index)
getDatastoreMapping in class JavaTypeMappingindex - The position of the mapping to return
public int getMappingNumberForValue(ObjectManager om,
java.lang.Object value)
om - ObjectManagervalue - The value
public void setObject(ObjectManager om,
java.lang.Object ps,
int[] pos,
java.lang.Object value)
setObject in class JavaTypeMappingom - Object Managerps - The PreparedStatementpos - The parameter positionsvalue - The object to populate the statement with
NotYetFlushedException - Thrown if the object is not yet flushed to the datastore
public void setObject(ObjectManager om,
java.lang.Object ps,
int[] pos,
java.lang.Object value,
StateManager ownerSM,
int ownerFieldNumber)
setObject in class JavaTypeMappingom - the ObjectManagerps - a datastore object that executes statements in the databasepos - The position(s) of the PreparedStatement to populatevalue - the value stored in this fieldownerSM - the owner StateManagerownerFieldNumber - the owner absolute field number
public java.lang.Object getObject(ObjectManager om,
java.lang.Object rs,
int[] pos)
getObject in class JavaTypeMappingom - Object Managerrs - The ResultSetpos - The parameter positions
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||