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.
| Modifier and Type | Field and Description |
|---|---|
| protected DatabaseField | field
A ref is always stored in a single field. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Expression | buildExpression(Object
TODO queryObject, QueryByExamplePolicy TODO policy, Expression TODO expressionBuilder, Map<K, V> TODO processedObjects, AbstractSession TODO session)Overrides org. |
| protected Vector | collectFields()
Overrides org. |
| public DatabaseField | getField()
Overrides org. |
| public String | |
| public Expression | getJoinCriteria(ObjectExpression context, Expression base)
Overrides org. |
| public boolean | hasConstraintDependency()
Overrides org. |
| public void | initialize(AbstractSession session)
Overrides org. |
| public boolean | isReferenceMapping()
Overrides org. |
| public boolean | isRelationalMapping()
Overrides org. |
| public void | postDelete(DeleteObjectQuery query)
Overrides org. |
| public void | postInsert(WriteObjectQuery query)
Overrides org. |
| public void | postUpdate(WriteObjectQuery query)
Overrides org. |
| public void | preDelete(DeleteObjectQuery query)
Overrides org. |
| public void | preInsert(WriteObjectQuery query)
Overrides org. |
| public void | preUpdate(WriteObjectQuery query)
Overrides org. |
| protected void | |
| public void | |
| public void | setReferenceClass(Class<?> referenceClass)
Overrides org. |
| public Object | valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery query, CacheKey cacheKey, AbstractSession executionSession, boolean isTargetProtected, Boolean[] wasCacheUsed)
Overrides org. |
| public void | writeFromObjectIntoRow(Object object, AbstractRecord record, AbstractSession session, DatabaseMapping.
Overrides org. |
| public void | writeFromObjectIntoRowForShallowInsert(Object object, AbstractRecord record, AbstractSession session)
Overrides org. |
| public void | writeFromObjectIntoRowForShallowInsertWithChangeRecord(ChangeRecord changeRecord, AbstractRecord record, AbstractSession session)
INTERNAL:
This row is built for shallow insert which happens in case of bidirectional inserts.
|
| public void | writeFromObjectIntoRowForUpdateAfterShallowInsert(Object object, AbstractRecord record, AbstractSession session, DatabaseTable table)
Overrides org. |
| public void | writeFromObjectIntoRowInternal(Object object, AbstractRecord record, AbstractSession session, boolean shouldIgnoreNull)
INTERNAL: Get a value from the object and set that in the respective field of the row. |
| public void | writeFromObjectIntoRowWithChangeRecord(ChangeRecord changeRecord, AbstractRecord record, AbstractSession session, DatabaseMapping.
Overrides org. |
| public void | writeInsertFieldsIntoRow(AbstractRecord record, AbstractSession session)
Overrides org. |
| field | back to summary |
|---|---|
| protected DatabaseField field A ref is always stored in a single field. | |
| ReferenceMapping | back to summary |
|---|---|
| public ReferenceMapping() | |
| collectFields | back to summary |
|---|---|
| protected Vector Overrides org. Returns all the aggregate fields.
| |
| getField | back to summary |
|---|---|
| public DatabaseField getField() Overrides org. INTERNAL: Returns the field which this mapping represents.
| |
| getFieldName | back to summary |
|---|---|
| public String getFieldName() PUBLIC: Return the name of the field this mapping represents. | |
| getJoinCriteria | back to summary |
|---|---|
| public Expression getJoinCriteria(ObjectExpression context, Expression base) Overrides org. INTERNAL: Join criteria is created to read target records (nested table) from the table.
| |
| hasConstraintDependency | back to summary |
|---|---|
| public boolean hasConstraintDependency() Overrides org. INTERNAL: The returns if the mapping has any constraint dependencies, such as foreign keys and join tables.
| |
| initialize | back to summary |
|---|---|
| public void initialize(AbstractSession session) throws DescriptorException Overrides org. INTERNAL: Initialize the mapping.
| |
| isReferenceMapping | back to summary |
|---|---|
| public boolean isReferenceMapping() Overrides org. INTERNAL:
| |
| isRelationalMapping | back to summary |
|---|---|
| public boolean isRelationalMapping() Overrides org. INTERNAL:
| |
| postDelete | back to summary |
|---|---|
| public void postDelete(DeleteObjectQuery query) throws DatabaseException, OptimisticLockException Overrides org. INTERNAL: Delete privately owned parts
| |
| postInsert | back to summary |
|---|---|
| public void postInsert(WriteObjectQuery query) throws DatabaseException, OptimisticLockException Overrides org. INTERNAL: Insert privately owned parts
| |
| postUpdate | back to summary |
|---|---|
| public void postUpdate(WriteObjectQuery query) throws DatabaseException, OptimisticLockException Overrides org. INTERNAL: Update privately owned parts
| |
| preDelete | back to summary |
|---|---|
| public void preDelete(DeleteObjectQuery query) throws DatabaseException, OptimisticLockException Overrides org. INTERNAL: Delete privately owned parts
| |
| preInsert | back to summary |
|---|---|
| public void preInsert(WriteObjectQuery query) throws DatabaseException, OptimisticLockException Overrides org. INTERNAL: Insert privately owned parts
| |
| preUpdate | back to summary |
|---|---|
| public void preUpdate(WriteObjectQuery query) throws DatabaseException, OptimisticLockException Overrides org. INTERNAL: Update privately owned parts
| |
| setField | back to summary |
|---|---|
| protected void setField(DatabaseField field) Set the field in the mapping. | |
| setFieldName | back to summary |
|---|---|
| public void setFieldName(String fieldName) PUBLIC: Set the field name in the mapping. | |
| setReferenceClass | back to summary |
|---|---|
| public void setReferenceClass(Class<?> referenceClass) Overrides org. PUBLIC: This is a reference class whose instances this mapping will store in the domain objects.
| |
| valueFromRow | back to summary |
|---|---|
| public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery query, CacheKey cacheKey, AbstractSession executionSession, boolean isTargetProtected, Boolean[] wasCacheUsed) throws DatabaseException Overrides org. INTERNAL: Return the value of the field from the row or a value holder on the query to obtain the object. Check for batch + aggregation reading.
| |
| writeFromObjectIntoRow | back to summary |
|---|---|
| public void writeFromObjectIntoRow(Object object, AbstractRecord record, AbstractSession session, DatabaseMapping. Overrides org. INTERNAL: Get a value from the object and set that in the respective field of the row.
| |
| writeFromObjectIntoRowForShallowInsert | back to summary |
|---|---|
| public void writeFromObjectIntoRowForShallowInsert(Object object, AbstractRecord record, AbstractSession session) Overrides org. INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts. The foreign keys must be set to null to avoid constraints.
| |
| writeFromObjectIntoRowForShallowInsertWithChangeRecord | back to summary |
|---|---|
| public void writeFromObjectIntoRowForShallowInsertWithChangeRecord(ChangeRecord changeRecord, AbstractRecord record, AbstractSession session) INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts. The foreign keys must be set to null to avoid constraints.
| |
| writeFromObjectIntoRowForUpdateAfterShallowInsert | back to summary |
|---|---|
| public void writeFromObjectIntoRowForUpdateAfterShallowInsert(Object object, AbstractRecord record, AbstractSession session, DatabaseTable table) Overrides org. INTERNAL: This row is built for update after shallow insert which happens in case of bidirectional inserts. It contains the foreign keys with non null values that were set to null for shallow insert.
| |
| writeFromObjectIntoRowInternal | back to summary |
|---|---|
| public void writeFromObjectIntoRowInternal(Object object, AbstractRecord record, AbstractSession session, boolean shouldIgnoreNull) INTERNAL: Get a value from the object and set that in the respective field of the row. | |
| writeFromObjectIntoRowWithChangeRecord | back to summary |
|---|---|
| public void writeFromObjectIntoRowWithChangeRecord(ChangeRecord changeRecord, AbstractRecord record, AbstractSession session, DatabaseMapping. Overrides org. INTERNAL: Get a value from the object and set that in the respective field of the row.
| |
| writeInsertFieldsIntoRow | back to summary |
|---|---|
| public void writeInsertFieldsIntoRow(AbstractRecord record, AbstractSession session) Overrides org. INTERNAL: Write fields needed for insert into the template for with null values.
| |