| java.lang.Object org.jpox.store.mapping.JavaTypeMapping org.jpox.store.mapping.MultiMapping org.jpox.store.mapping.ReferenceMapping
All known Subclasses: org.jpox.store.mapping.ObjectMapping, org.jpox.store.mapping.InterfaceMapping,
ReferenceMapping | abstract public class ReferenceMapping extends MultiMapping implements MappingCallbacks(Code) | | Mapping for a reference type.
This can be used for things like interfaces, or Object which are simply a reference to
some specific (PersistenceCapable) class. All fields of this type have a list of
possible "implementations" of the reference type. A column is created for each possible
implementation of the reference as a FK to the implementation table.
version: $Revision: 1.33 $ |
Method Summary | |
protected void | createColumns(DatastoreContainerObject datastoreContainer, AbstractMemberMetaData fmd, ClassLoaderResolver clr) Convenience method to create a column for each implementation type of this reference. | public Class | getJavaType() | public Object | getSampleValue(ClassLoaderResolver clr) | public void | initialize(DatastoreAdapter dba, AbstractMemberMetaData fmd, DatastoreContainerObject container, ClassLoaderResolver clr) 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) | public void | postFetch(StateManager sm) Method executed just after a fetch of the owning object, allowing any necessary action
to this field and the object stored in it. | public void | postInsert(StateManager sm) Method executed just after the insert of the owning object, allowing any necessary action
to this field and the object stored in it. | public void | postUpdate(StateManager sm) Method executed just afer any update of the owning object, allowing any necessary action
to this field and the object stored in it. | public void | preDelete(StateManager sm) Method executed just before the owning object is deleted, allowing tidying up of any
relation information. |
createColumns | protected void createColumns(DatastoreContainerObject datastoreContainer, AbstractMemberMetaData fmd, ClassLoaderResolver clr)(Code) | | Convenience method to create a column for each implementation type of this reference.
Parameters: datastoreContainer - Table to use Parameters: fmd - MetaData for the field Parameters: clr - The ClassLoaderResolver |
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 |
postFetch | public void postFetch(StateManager sm)(Code) | | Method executed just after a fetch of the owning object, allowing any necessary action
to this field and the object stored in it.
Parameters: sm - StateManager for the owner. |
postInsert | public void postInsert(StateManager sm)(Code) | | Method executed just after the insert of the owning object, allowing any necessary action
to this field and the object stored in it.
Parameters: sm - StateManager for the owner |
postUpdate | public void postUpdate(StateManager sm)(Code) | | Method executed just afer any update of the owning object, allowing any necessary action
to this field and the object stored in it.
Parameters: sm - StateManager for the owner |
preDelete | public void preDelete(StateManager sm)(Code) | | Method executed just before the owning object is deleted, allowing tidying up of any
relation information.
Parameters: sm - StateManager for the owner |
Methods inherited from org.jpox.store.mapping.MultiMapping | public void addJavaTypeMapping(JavaTypeMapping mapping)(Code)(Java Doc) public DatastoreMapping getDataStoreMapping(int index)(Code)(Java Doc) public JavaTypeMapping[] getJavaTypeMapping()(Code)(Java Doc) public int getNumberOfDatastoreFields()(Code)(Java Doc) public Object getObject(ObjectManager om, Object rs, int[] pos)(Code)(Java Doc) public void setObject(ObjectManager om, Object ps, int[] pos, Object value)(Code)(Java Doc) public void setObject(ObjectManager om, Object ps, int[] pos, Object value, StateManager ownerSM, int ownerFieldNumber)(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)
|
|
|