| java.lang.Object org.jpox.store.mapping.JavaTypeMapping org.jpox.store.mapping.SingleFieldMapping org.jpox.store.mapping.EmbeddedMapping
All known Subclasses: org.jpox.store.mapping.EmbeddedKeyPCMapping, org.jpox.store.mapping.EmbeddedElementPCMapping, org.jpox.store.mapping.EmbeddedPCMapping, org.jpox.store.mapping.EmbeddedValuePCMapping,
EmbeddedMapping | abstract public class EmbeddedMapping extends SingleFieldMapping implements SimpleDatastoreRepresentation(Code) | | Mapping for an embedded PC object.
The PC object can be embedded directly (1-1 relation) or be the element of
a collection, or be the key or value of a map.
version: $Revision: 1.35 $ |
Method Summary | |
public void | addJavaTypeMapping(JavaTypeMapping mapping) Add a new JavaTypeMapping to manage. | public Class | getJavaType() Accessor for the Java type being represented here. | public JavaTypeMapping | getJavaTypeMapping(int i) | public JavaTypeMapping | getJavaTypeMapping(String fieldName) | public int | getNumberOfJavaTypeMappings() | public Object | getObject(ObjectManager om, Object rs, int[] param) | public Object | getObject(ObjectManager om, Object rs, int[] param, StateManager ownerSM, int ownerFieldNumber) | public Object | getSampleValue(ClassLoaderResolver clr) Accessor for the sample value for this type. | public void | initialize(DatastoreAdapter dba, AbstractMemberMetaData fmd, DatastoreContainerObject container, ClassLoaderResolver clr) Initialize this JavaTypeMapping with the given DatastoreAdapter for the given FieldMetaData. | public void | initialize(DatastoreAdapter dba, AbstractMemberMetaData fmd, DatastoreContainerObject datastoreContainer, ClassLoaderResolver clr, EmbeddedMetaData emd, String typeName, int objectType) Initialize this JavaTypeMapping with the given DatastoreAdapter for
the given FieldMetaData. | public ScalarExpression | newLiteral(QueryExpression qs, Object value) | public ScalarExpression | newScalarExpression(QueryExpression qs, LogicSetExpression te) | protected void | prepareDatastoreMapping() Method to prepare a field mapping for use in the datastore. | public void | setObject(ObjectManager om, Object ps, int[] param, Object value) Mutator for the embedded object in the datastore. | public void | setObject(ObjectManager om, Object ps, int[] param, Object value, StateManager ownerSM, int ownerFieldNumber) Mutator for the embedded object in the datastore. |
javaTypeMappings | protected List javaTypeMappings(Code) | | Mappings of the fields of the embedded PC.
|
objectType | protected int objectType(Code) | | Type of PC object. Corresponds to the values in StateManagerImpl.
|
typeName | protected String typeName(Code) | | Type name for the object being embedded.
|
addJavaTypeMapping | public void addJavaTypeMapping(JavaTypeMapping mapping)(Code) | | Add a new JavaTypeMapping to manage.
Parameters: mapping - the JavaTypeMapping |
getJavaType | public Class getJavaType()(Code) | | Accessor for the Java type being represented here.
The Java type |
getJavaTypeMapping | public JavaTypeMapping getJavaTypeMapping(int i)(Code) | | Accessor for the java type mappings
Parameters: i - the index position of the java type mapping the java type mapping |
getJavaTypeMapping | public JavaTypeMapping getJavaTypeMapping(String fieldName)(Code) | | Accessor for the sub type mapping for a particular field name
Parameters: fieldName - The field name The type mapping for that field in the embedded object |
getNumberOfJavaTypeMappings | public int getNumberOfJavaTypeMappings()(Code) | | Accessor for the number of java type mappings
Number of java type mappings of the fields of the embedded PC element |
getObject | public Object getObject(ObjectManager om, Object rs, int[] param)(Code) | | Accessor for the embedded object from the result set
Parameters: om - ObjectManager managing this object Parameters: rs - The ResultSet Parameters: param - Array of param numbers in the ResultSet for the fields of this object The embedded object |
getObject | public Object getObject(ObjectManager om, Object rs, int[] param, StateManager ownerSM, int ownerFieldNumber)(Code) | | Accessor for the embedded object from the result set
Parameters: om - Object Manager managing this object Parameters: rs - The ResultSet Parameters: param - Array of param numbers in the ResultSet for the fields of this object Parameters: ownerSM - StateManager of the owning object containing this embedded object Parameters: ownerFieldNumber - Field number in the owning object where this is stored The embedded object |
initialize | public void initialize(DatastoreAdapter dba, AbstractMemberMetaData fmd, DatastoreContainerObject container, ClassLoaderResolver clr)(Code) | | Initialize this JavaTypeMapping with the given DatastoreAdapter for the given FieldMetaData.
Parameters: dba - The Datastore Adapter that this Mapping should use. Parameters: fmd - FieldMetaData for the field to be mapped (if any) Parameters: container - The datastore container storing this mapping (if any) Parameters: clr - the ClassLoaderResolver throws: JPOXException - |
initialize | public void initialize(DatastoreAdapter dba, AbstractMemberMetaData fmd, DatastoreContainerObject datastoreContainer, ClassLoaderResolver clr, EmbeddedMetaData emd, String typeName, int objectType)(Code) | | Initialize this JavaTypeMapping with the given DatastoreAdapter for
the given FieldMetaData.
Parameters: dba - Datastore Adapter Parameters: fmd - metadata for the field Parameters: datastoreContainer - Table for persisting this field Parameters: clr - The ClassLoaderResolver Parameters: emd - Embedded MetaData for the object being embedded Parameters: typeName - type of the embedded PC object Parameters: objectType - Type of the PC object being embedded (see StateManagerImpl object types) |
prepareDatastoreMapping | protected void prepareDatastoreMapping()(Code) | | Method to prepare a field mapping for use in the datastore.
Overridden so it does nothing
|
setObject | public void setObject(ObjectManager om, Object ps, int[] param, Object value)(Code) | | Mutator for the embedded object in the datastore.
Parameters: om - The Object Manager managing this object Parameters: ps - The Prepared Statement Parameters: param - Param numbers in the PreparedStatement for the fields of this object Parameters: value - The embedded object to use |
setObject | public void setObject(ObjectManager om, Object ps, int[] param, Object value, StateManager ownerSM, int ownerFieldNumber)(Code) | | Mutator for the embedded object in the datastore.
Parameters: om - The Object Manager managing this object Parameters: ps - The Prepared Statement Parameters: param - Param numbers in the PreparedStatement for the fields of this object Parameters: value - The embedded object to use Parameters: ownerSM - StateManager of the owning object containing this embedded object Parameters: ownerFieldNumber - Field number in the owning object where this is stored |
Methods inherited from org.jpox.store.mapping.SingleFieldMapping | public boolean equals(Object obj)(Code)(Java Doc) public boolean getBoolean(ObjectManager om, Object resultSet, int[] exprIndex)(Code)(Java Doc) public byte getByte(ObjectManager om, Object resultSet, int[] exprIndex)(Code)(Java Doc) public char getChar(ObjectManager om, Object resultSet, int[] exprIndex)(Code)(Java Doc) public int getDefaultLength(int index)(Code)(Java Doc) public double getDouble(ObjectManager om, Object resultSet, int[] exprIndex)(Code)(Java Doc) public float getFloat(ObjectManager om, Object resultSet, int[] exprIndex)(Code)(Java Doc) public int getInt(ObjectManager om, Object resultSet, int[] exprIndex)(Code)(Java Doc) public String getJavaTypeForDatastoreMapping(int index)(Code)(Java Doc) public long getLong(ObjectManager om, Object resultSet, int[] exprIndex)(Code)(Java Doc) public Object getObject(ObjectManager om, Object resultSet, int[] exprIndex)(Code)(Java Doc) public short getShort(ObjectManager om, Object resultSet, int[] exprIndex)(Code)(Java Doc) public String getString(ObjectManager om, Object resultSet, int[] exprIndex)(Code)(Java Doc) public ScalarExpression[] getValidValues(int index)(Code)(Java Doc) public void initialize(DatastoreAdapter dba, AbstractMemberMetaData fmd, DatastoreContainerObject container, ClassLoaderResolver clr)(Code)(Java Doc) protected void prepareDatastoreMapping()(Code)(Java Doc) public void setBoolean(ObjectManager om, Object preparedStatement, int[] exprIndex, boolean value)(Code)(Java Doc) public void setByte(ObjectManager om, Object preparedStatement, int[] exprIndex, byte value)(Code)(Java Doc) public void setChar(ObjectManager om, Object preparedStatement, int[] exprIndex, char value)(Code)(Java Doc) public void setDouble(ObjectManager om, Object preparedStatement, int[] exprIndex, double value)(Code)(Java Doc) public void setFloat(ObjectManager om, Object preparedStatement, int[] exprIndex, float value)(Code)(Java Doc) public void setInt(ObjectManager om, Object preparedStatement, int[] exprIndex, int value)(Code)(Java Doc) public void setLong(ObjectManager om, Object preparedStatement, int[] exprIndex, long value)(Code)(Java Doc) public void setObject(ObjectManager om, Object preparedStatement, int[] exprIndex, Object value)(Code)(Java Doc) public void setShort(ObjectManager om, Object preparedStatement, int[] exprIndex, short value)(Code)(Java Doc) public void setString(ObjectManager om, Object preparedStatement, int[] exprIndex, String value)(Code)(Java Doc)
|
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)
|
|
|