|
Oracle® Fusion Middleware Java API Reference for EclipseLink 11g Release 1 (11.1.1) E26376-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
org.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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMapping |
|---|
DatabaseMapping.WriteType |
| Field Summary | |
|---|---|
protected org.eclipse.persistence.internal.helper.DatabaseField |
fieldA 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.DatabaseMapping |
|---|
attributeAccessor, attributeName, derivedIdMapping, derivesId, descriptor, fields, isCacheable, isJPAId, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mapsIdValue, NO_FIELDS, NO_WEIGHT, properties, weight, WEIGHT_AGGREGATE, WEIGHT_DIRECT, WEIGHT_TO_ONE, WEIGHT_TRANSFORM |
| 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: |
boolean |
isRelationalMapping()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.identitymaps.CacheKey cacheKey, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected, java.lang.Boolean[] wasCacheUsed)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, DatabaseMapping.WriteType writeType)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, DatabaseMapping.WriteType writeType)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 ObjectReferenceMappingpublic org.eclipse.persistence.internal.helper.DatabaseField getField()
getField in class DatabaseMappingpublic java.lang.String getFieldName()
public Expression getJoinCriteria(org.eclipse.persistence.internal.expressions.QueryKeyExpression exp)
getJoinCriteria in class ForeignReferenceMappingpublic boolean hasConstraintDependency()
hasConstraintDependency in class ObjectReferenceMapping
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
initialize in class ForeignReferenceMappingDescriptorExceptionpublic boolean isReferenceMapping()
isReferenceMapping in class DatabaseMapping
public void preInsert(WriteObjectQuery query)
throws DatabaseException,
OptimisticLockException
preInsert in class ObjectReferenceMappingDatabaseExceptionOptimisticLockException
public void preUpdate(WriteObjectQuery query)
throws DatabaseException,
OptimisticLockException
preUpdate in class ObjectReferenceMappingDatabaseExceptionOptimisticLockException
public void postInsert(WriteObjectQuery query)
throws DatabaseException,
OptimisticLockException
postInsert in class ObjectReferenceMappingDatabaseExceptionOptimisticLockException
public void postDelete(DeleteObjectQuery query)
throws DatabaseException,
OptimisticLockException
postDelete in class ObjectReferenceMappingDatabaseExceptionOptimisticLockException
public void postUpdate(WriteObjectQuery query)
throws DatabaseException,
OptimisticLockException
postUpdate in class ObjectReferenceMappingDatabaseExceptionOptimisticLockException
public void preDelete(DeleteObjectQuery query)
throws DatabaseException,
OptimisticLockException
preDelete in class ObjectReferenceMappingDatabaseExceptionOptimisticLockExceptionprotected 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.identitymaps.CacheKey cacheKey,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession,
boolean isTargetProtected,
java.lang.Boolean[] wasCacheUsed)
throws DatabaseException
valueFromRow in class ForeignReferenceMappingDatabaseException
public void writeFromObjectIntoRow(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session,
DatabaseMapping.WriteType writeType)
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,
DatabaseMapping.WriteType writeType)
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 DatabaseMappingpublic boolean isRelationalMapping()
isRelationalMapping in class DatabaseMapping
|
Oracle® Fusion Middleware Java API Reference for EclipseLink 11g Release 1 (11.1.1) E26376-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||