Class AggregateCollectionMapping

All Implemented Interfaces:
Serializable, Cloneable, ContainerMapping, EmbeddableMapping, MapComponentMapping, RelationalMapping

public class AggregateCollectionMapping extends CollectionMapping implements RelationalMapping, MapComponentMapping, EmbeddableMapping

Purpose: The aggregate collection mapping is used to represent the aggregate relationship between a single source object and a collection of target objects. The target objects cannot exist without the existence of the source object (privately owned) Unlike the normal aggregate mapping, there is a target table being mapped from the target objects. Unlike normal 1:m mapping, there is no 1:1 back reference mapping, as foreign key constraints have been resolved by the aggregation.

Since:
TOPLink/Java 3.0
See Also:
  • Field Details

    • targetForeignKeyFields

      protected List<DatabaseField> targetForeignKeyFields
      This is a key in the target table which is a foreign key in the target table.
    • sourceKeyFields

      protected List<DatabaseField> sourceKeyFields
      This is a primary key in the source table that is used as foreign key in the target table
    • targetForeignKeyToSourceKeys

      protected Map<DatabaseField,DatabaseField> targetForeignKeyToSourceKeys
      Foreign keys in the target table to the related keys in the source table
    • aggregateToSourceFields

      protected Map<String,DatabaseField> aggregateToSourceFields
      Map the name of a field in the aggregate collection descriptor to a field in the actual table specified in the mapping.
    • nestedAggregateToSourceFields

      protected Map<String,Map<String,DatabaseField>> nestedAggregateToSourceFields
      Map the name of an attribute of the reference descriptor mapped with AggregateCollectionMapping to aggregateToSourceFieldNames that should be applied to this mapping.
    • converters

      protected Map<String,Converter> converters
      List of converters to apply at initialize time to their cloned aggregate mappings.
    • remoteReferenceDescriptor

      protected ClassDescriptor remoteReferenceDescriptor
      In RemoteSession case the mapping needs the reference descriptor serialized from the server, but referenceDescriptor attribute defined as transient in the superclass. To overcome that in non-remote case referenceDescriptor is assigned to remoteReferenceDescriptor; in remote - another way around.
    • defaultSourceTable

      protected DatabaseTable defaultSourceTable
      Default source table that should be used with the default source fields of this mapping.
    • isEntireObjectPK

      protected boolean isEntireObjectPK
      Indicates whether the entire target object is primary key - in that case the object can't be updated in the db, but rather deleted and then re-inserted.
    • updateListOrderFieldQuery

      protected transient DataModifyQuery updateListOrderFieldQuery
      These queries used to update listOrderField
    • bulkUpdateListOrderFieldQuery

      protected transient DataModifyQuery bulkUpdateListOrderFieldQuery
    • pkUpdateListOrderFieldQuery

      protected transient DataModifyQuery pkUpdateListOrderFieldQuery
    • isListOrderFieldUpdatable

      protected boolean isListOrderFieldUpdatable
      indicates whether listOrderField value could be updated in the db. Used only if listOrderField!=null
    • min

      protected static final String min
      See Also:
    • max

      protected static final String max
      See Also:
    • shift

      protected static final String shift
      See Also:
    • pk

      protected static final String pk
      See Also:
    • bulk

      protected static final String bulk
      See Also:
    • hasNestedIdentityReference

      protected Boolean hasNestedIdentityReference
      Indicates whether the mapping (or at least one of its nested mappings, at any nested depth) references an entity. To return true the mapping (or nested mapping) should be ForeignReferenceMapping with non-null and non-aggregate reference descriptor. Lazily initialized.
  • Constructor Details

    • AggregateCollectionMapping

      public AggregateCollectionMapping()
      PUBLIC: Default constructor.
  • Method Details