|
EclipseLink 1.1.4, build 'v20100812-r7860' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.mappings.DatabaseMapping
org.eclipse.persistence.mappings.ForeignReferenceMapping
org.eclipse.persistence.mappings.ObjectReferenceMapping
org.eclipse.persistence.mappings.structures.ReferenceMapping
public class ReferenceMapping
Purpose: In an object-relational data model, structures reference each other through "Refs"; not through foreign keys as in the relational data model. TopLink supports using the Ref to reference the target object.
Field Summary | |
---|---|
protected org.eclipse.persistence.internal.helper.DatabaseField |
field
A ref is always stored in a single field. |
Fields inherited from class org.eclipse.persistence.mappings.ObjectReferenceMapping |
---|
foreignKeyFields, isForeignKeyRelationship |
Fields inherited from class org.eclipse.persistence.mappings.ForeignReferenceMapping |
---|
cascadeMerge, cascadePersist, cascadeRefresh, cascadeRemove, forceInitializationOfSelectionCriteria, hasCustomSelectionQuery, indirectionPolicy, INNER_JOIN, isPrivateOwned, joinFetch, NONE, OUTER_JOIN, referenceClass, referenceClassName, referenceDescriptor, relationshipPartner, relationshipPartnerAttributeName, requiresTransientWeavedFields, selectionQuery, tempInitSession, usesBatchReading |
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping |
---|
attributeAccessor, attributeName, descriptor, fields, isLazy, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, NO_FIELDS, NO_WEIGHT, properties, weight, WEIGHT_1 |
Constructor Summary | |
---|---|
ReferenceMapping()
|
Method Summary | |
---|---|
protected java.util.Vector |
collectFields()
Returns all the aggregate fields. |
org.eclipse.persistence.internal.helper.DatabaseField |
getField()
INTERNAL: Returns the field which this mapping represents. |
java.lang.String |
getFieldName()
PUBLIC: Return the name of the field this mapping represents. |
Expression |
getJoinCriteria(org.eclipse.persistence.internal.expressions.QueryKeyExpression exp)
INTERNAL: Join criteria is created to read target records (nested table) from the table. |
boolean |
hasConstraintDependency()
INTERNAL: The returns if the mapping has any constraint dependencies, such as foreign keys and join tables. |
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Initialize the mapping. |
boolean |
isReferenceMapping()
INTERNAL: |
void |
postDelete(DeleteObjectQuery query)
INTERNAL: Delete privately owned parts |
void |
postInsert(WriteObjectQuery query)
INTERNAL: Insert privately owned parts |
void |
postUpdate(WriteObjectQuery query)
INTERNAL: Update privately owned parts |
void |
preDelete(DeleteObjectQuery query)
INTERNAL: Delete privately owned parts |
void |
preInsert(WriteObjectQuery query)
INTERNAL: Insert privately owned parts |
void |
preUpdate(WriteObjectQuery query)
INTERNAL: Update privately owned parts |
protected void |
setField(org.eclipse.persistence.internal.helper.DatabaseField field)
Set the field in the mapping. |
void |
setFieldName(java.lang.String fieldName)
PUBLIC: Set the field name in the mapping. |
void |
setReferenceClass(java.lang.Class referenceClass)
PUBLIC: This is a reference class whose instances this mapping will store in the domain objects. |
java.lang.Object |
valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery query,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL: Return the value of the field from the row or a value holder on the query to obtain the object. |
void |
writeFromObjectIntoRow(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Get a value from the object and set that in the respective field of the row. |
void |
writeFromObjectIntoRowForShallowInsert(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts. |
void |
writeFromObjectIntoRowForShallowInsertWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts. |
void |
writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Get a value from the object and set that in the respective field of the row. |
void |
writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Write fields needed for insert into the template for with null values. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected org.eclipse.persistence.internal.helper.DatabaseField field
Constructor Detail |
---|
public ReferenceMapping()
Method Detail |
---|
protected java.util.Vector collectFields()
collectFields
in class ObjectReferenceMapping
public org.eclipse.persistence.internal.helper.DatabaseField getField()
getField
in class DatabaseMapping
public java.lang.String getFieldName()
public Expression getJoinCriteria(org.eclipse.persistence.internal.expressions.QueryKeyExpression exp)
getJoinCriteria
in class ForeignReferenceMapping
public boolean hasConstraintDependency()
hasConstraintDependency
in class ObjectReferenceMapping
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
initialize
in class ForeignReferenceMapping
DescriptorException
public boolean isReferenceMapping()
isReferenceMapping
in class DatabaseMapping
public void preInsert(WriteObjectQuery query) throws DatabaseException, OptimisticLockException
preInsert
in class ObjectReferenceMapping
DatabaseException
OptimisticLockException
public void preUpdate(WriteObjectQuery query) throws DatabaseException, OptimisticLockException
preUpdate
in class ObjectReferenceMapping
DatabaseException
OptimisticLockException
public void postInsert(WriteObjectQuery query) throws DatabaseException, OptimisticLockException
postInsert
in class ObjectReferenceMapping
DatabaseException
OptimisticLockException
public void postDelete(DeleteObjectQuery query) throws DatabaseException, OptimisticLockException
postDelete
in class ObjectReferenceMapping
DatabaseException
OptimisticLockException
public void postUpdate(WriteObjectQuery query) throws DatabaseException, OptimisticLockException
postUpdate
in class ObjectReferenceMapping
DatabaseException
OptimisticLockException
public void preDelete(DeleteObjectQuery query) throws DatabaseException, OptimisticLockException
preDelete
in class ObjectReferenceMapping
DatabaseException
OptimisticLockException
protected void setField(org.eclipse.persistence.internal.helper.DatabaseField field)
public void setFieldName(java.lang.String fieldName)
public void setReferenceClass(java.lang.Class referenceClass)
setReferenceClass
in class ForeignReferenceMapping
public java.lang.Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery query, org.eclipse.persistence.internal.sessions.AbstractSession executionSession) throws DatabaseException
valueFromRow
in class ForeignReferenceMapping
DatabaseException
public void writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)
writeFromObjectIntoRow
in class DatabaseMapping
public void writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)
writeFromObjectIntoRowWithChangeRecord
in class DatabaseMapping
public void writeFromObjectIntoRowForShallowInsert(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)
writeFromObjectIntoRowForShallowInsert
in class DatabaseMapping
public void writeFromObjectIntoRowForShallowInsertWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)
writeFromObjectIntoRowForShallowInsertWithChangeRecord
in class DatabaseMapping
public void writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)
writeInsertFieldsIntoRow
in class DatabaseMapping
|
EclipseLink 1.1.4, build 'v20100812-r7860' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |