Oracle Fusion Middleware Java API Reference for Oracle TopLink (Deprecated)
11g Release 1 (11.1.1)

B32476-04

oracle.toplink.mappings
Class AggregateObjectMapping

java.lang.Object
  extended by oracle.toplink.mappings.DatabaseMapping
      extended by oracle.toplink.mappings.AggregateMapping
          extended by oracle.toplink.mappings.AggregateObjectMapping
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, oracle.toplink.mappings.RelationalMapping

public class AggregateObjectMapping
extends AggregateMapping
implements oracle.toplink.mappings.RelationalMapping

Purpose:Two objects can be considered to be related by aggregation if there is a strict 1:1 relationship between the objects. This means that the target (child or owned) object cannot exist without the source (parent) object. In TopLink, it also means the data for the owned object is stored in the same table as the parent.

Since:
TOPLink/Java 1.0
See Also:
Serialized Form

Constructor Summary
AggregateObjectMapping()
          Default constructor.
 
Method Summary
 void addFieldNameTranslation(java.lang.String sourceFieldName, java.lang.String aggregateFieldName)
          Add a field name translation that maps from a field name in the source table to a field name in the aggregate descriptor.
 void allowNull()
          If all the fields in the database row for the aggregate object are NULL, then, by default, TopLink will place a null in the appropriate source object (as opposed to an aggregate object filled with nulls).
 void dontAllowNull()
          If all the fields in the database row for the aggregate object are NULL, then, by default, TopLink will place a null in the appropriate source object (as opposed to an aggregate object filled with nulls).
 
Methods inherited from class oracle.toplink.mappings.AggregateMapping
getReferenceClass, setReferenceClass
 
Methods inherited from class oracle.toplink.mappings.DatabaseMapping
getAttributeAccessor, getAttributeClassification, getAttributeName, getGetMethodName, getProperty, getSetMethodName, isLazy, isOptional, isUsingMethodAccess, readOnly, readWrite, setAttributeAccessor, setAttributeName, setGetMethodName, setIsLazy, setIsOptional, setIsReadOnly, setProperty, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AggregateObjectMapping

public AggregateObjectMapping()
Default constructor.

Method Detail

addFieldNameTranslation

public void addFieldNameTranslation(java.lang.String sourceFieldName,
                                    java.lang.String aggregateFieldName)
Add a field name translation that maps from a field name in the source table to a field name in the aggregate descriptor.


allowNull

public void allowNull()
If all the fields in the database row for the aggregate object are NULL, then, by default, TopLink will place a null in the appropriate source object (as opposed to an aggregate object filled with nulls). This behavior can be explicitly set by calling #allowNull(). To change this behavior, call #dontAllowNull(). Then TopLink will build a new instance of the aggregate object that is filled with nulls and place it in the source object. In either situation, when writing, TopLink will place a NULL in all the fields in the database row for the aggregate object.


dontAllowNull

public void dontAllowNull()
If all the fields in the database row for the aggregate object are NULL, then, by default, TopLink will place a null in the appropriate source object (as opposed to an aggregate object filled with nulls). This behavior can be explicitly set by calling #allowNull(). To change this behavior, call #dontAllowNull(). Then TopLink will build a new instance of the aggregate object that is filled with nulls and place it in the source object. In either situation, when writing, TopLink will place a NULL in all the fields in the database row for the aggregate object.


Copyright © 1998, 2012, Oracle. All Rights Reserved.