| java.lang.Object org.jpox.store.mapping.JavaTypeMapping org.jpox.store.mapping.MultiMapping
All known Subclasses: org.jpox.store.mapping.ReferenceMapping, org.jpox.store.mapping.SubclassPCMapping,
MultiMapping | abstract public class MultiMapping extends JavaTypeMapping (Code) | | Mapping to represent multiple mappings.
This mapping can be used to represent, for example,
- a reference field (where there are multiple implementations)
- an element in a collection and the element has no table of its own, but multiple subclasses
- a FK of a PC field (where there may be multiple fields in the PK of the PC object)
version: $Revision: 1.37 $ |
Method Summary | |
public void | addJavaTypeMapping(JavaTypeMapping mapping) | public DatastoreMapping | getDataStoreMapping(int index) Accessor for a datastore mapping. | public JavaTypeMapping[] | getJavaTypeMapping() | public int | getNumberOfDatastoreFields() Accessor for the number of datastore fields. | public Object | getObject(ObjectManager om, Object rs, int[] pos) Method to retrieve an object of this type from the ResultSet. | public void | setObject(ObjectManager om, Object ps, int[] pos, Object value) Method to set the parameters in the PreparedStatement with the fields of
this object. | public void | setObject(ObjectManager om, Object ps, int[] pos, Object value, StateManager ownerSM, int ownerFieldNumber) Sets a value into preparedStatement
at position specified by exprIndex . |
javaTypeMappings | protected JavaTypeMapping[] javaTypeMappings(Code) | | The Java mappings represented by this mapping.
|
addJavaTypeMapping | public void addJavaTypeMapping(JavaTypeMapping mapping)(Code) | | Method to add a Java type mapping for a field
Parameters: mapping - The mapping to add |
getDataStoreMapping | public DatastoreMapping getDataStoreMapping(int index)(Code) | | Accessor for a datastore mapping.
Parameters: index - The position of the mapping to return The datastore mapping |
getJavaTypeMapping | public JavaTypeMapping[] getJavaTypeMapping()(Code) | | Accessor for the Java type mappings
The Java type mappings |
getNumberOfDatastoreFields | public int getNumberOfDatastoreFields()(Code) | | Accessor for the number of datastore fields.
The number of datastore fields. |
getObject | public Object getObject(ObjectManager om, Object rs, int[] pos)(Code) | | Method to retrieve an object of this type from the ResultSet.
Parameters: om - Object Manager Parameters: rs - The ResultSet Parameters: pos - The parameter positions The object |
setObject | public void setObject(ObjectManager om, Object ps, int[] pos, Object value)(Code) | | Method to set the parameters in the PreparedStatement with the fields of
this object.
Parameters: om - Object Manager Parameters: ps - The PreparedStatement Parameters: pos - The parameter positions Parameters: value - The object to populate the statement with throws: NotYetFlushedException - Thrown if the object is not yet flushed to the datastore |
setObject | public void setObject(ObjectManager om, Object ps, int[] pos, Object value, StateManager ownerSM, int ownerFieldNumber)(Code) | | Sets a value into preparedStatement
at position specified by exprIndex .
Parameters: om - the ObjectManager Parameters: ps - a datastore object that executes statements in the database Parameters: pos - the position of the value in the statement Parameters: value - the value Parameters: ownerSM - the owner StateManager Parameters: ownerFieldNumber - the owner absolute field number |
Methods inherited from org.jpox.store.mapping.JavaTypeMapping | public void addDataStoreMapping(DatastoreMapping datastoreMapping)(Code)(Java Doc) protected String failureMessage(String method)(Code)(Java Doc) public boolean getBoolean(ObjectManager om, Object datastoreResults, int[] exprIndex)(Code)(Java Doc) public byte getByte(ObjectManager om, Object datastoreResults, int[] exprIndex)(Code)(Java Doc) public char getChar(ObjectManager om, Object datastoreResults, int[] exprIndex)(Code)(Java Doc) public DatastoreMapping getDataStoreMapping(int index)(Code)(Java Doc) public DatastoreMapping[] getDataStoreMappings()(Code)(Java Doc) public DatastoreContainerObject getDatastoreContainer()(Code)(Java Doc) public double getDouble(ObjectManager om, Object datastoreResults, int[] exprIndex)(Code)(Java Doc) public AbstractMemberMetaData getFieldMetaData()(Code)(Java Doc) public float getFloat(ObjectManager om, Object datastoreResults, int[] exprIndex)(Code)(Java Doc) public int getInt(ObjectManager om, Object datastoreResults, int[] exprIndex)(Code)(Java Doc) abstract public Class getJavaType()(Code)(Java Doc) public String getJavaTypeForDatastoreMapping(int index)(Code)(Java Doc) public long getLong(ObjectManager om, Object datastoreResults, int[] exprIndex)(Code)(Java Doc) public int getNumberOfDatastoreFields()(Code)(Java Doc) public Object getObject(ObjectManager om, Object datastoreResults, int[] exprIndex, StateManager ownerSM, int ownerFieldNumber)(Code)(Java Doc) public Object getObject(ObjectManager om, Object datastoreResults, int[] exprIndex)(Code)(Java Doc) public JavaTypeMapping getReferenceMapping()(Code)(Java Doc) public int getRoleForField()(Code)(Java Doc) abstract public Object getSampleValue(ClassLoaderResolver clr)(Code)(Java Doc) public short getShort(ObjectManager om, Object datastoreResults, int[] exprIndex)(Code)(Java Doc) public String getString(ObjectManager om, Object datastoreResults, int[] exprIndex)(Code)(Java Doc) public String getType()(Code)(Java Doc) public boolean includeInFetchStatement()(Code)(Java Doc) public boolean includeInInsertStatement()(Code)(Java Doc) public boolean includeInUpdateStatement()(Code)(Java Doc) public void initialize(DatastoreAdapter dba, String type)(Code)(Java Doc) public void initialize(DatastoreAdapter dba, AbstractMemberMetaData fmd, DatastoreContainerObject container, ClassLoaderResolver clr)(Code)(Java Doc) public boolean isNullable()(Code)(Java Doc) public boolean isSerialised()(Code)(Java Doc) abstract public ScalarExpression newLiteral(QueryExpression qs, Object value)(Code)(Java Doc) abstract public ScalarExpression newScalarExpression(QueryExpression qs, LogicSetExpression te)(Code)(Java Doc) public void setBoolean(ObjectManager om, Object datastoreStatement, int[] exprIndex, boolean value)(Code)(Java Doc) public void setByte(ObjectManager om, Object datastoreStatement, int[] exprIndex, byte value)(Code)(Java Doc) public void setChar(ObjectManager om, Object datastoreStatement, int[] exprIndex, char value)(Code)(Java Doc) public void setDefault(ObjectManager om, Object datastoreStatement, int[] exprIndex)(Code)(Java Doc) public void setDouble(ObjectManager om, Object datastoreStatement, int[] exprIndex, double value)(Code)(Java Doc) public void setFieldInformation(AbstractMemberMetaData fmd, DatastoreContainerObject container)(Code)(Java Doc) public void setFloat(ObjectManager om, Object datastoreStatement, int[] exprIndex, float value)(Code)(Java Doc) public void setInt(ObjectManager om, Object datastoreStatement, int[] exprIndex, int value)(Code)(Java Doc) public void setLong(ObjectManager om, Object datastoreStatement, int[] exprIndex, long value)(Code)(Java Doc) public void setObject(ObjectManager om, Object datastoreStatement, int[] exprIndex, Object value, StateManager ownerSM, int ownerFieldNumber)(Code)(Java Doc) public void setObject(ObjectManager om, Object datastoreStatement, int[] exprIndex, Object value)(Code)(Java Doc) public void setReferenceMapping(JavaTypeMapping referenceMapping)(Code)(Java Doc) public void setRoleForField(int role)(Code)(Java Doc) public void setShort(ObjectManager om, Object datastoreStatement, int[] exprIndex, short value)(Code)(Java Doc) public void setString(ObjectManager om, Object datastoreStatement, int[] exprIndex, String value)(Code)(Java Doc)
|
|
|