Class OneToManyAccessor

  • All Implemented Interfaces:
    MappedKeyMapAccessor

    public class OneToManyAccessor
    extends CollectionAccessor
    INTERNAL: A OneToMany relationship accessor. A OneToMany annotation currently is not required to be on the accessible object, that is, a 1-M can default. Key notes: - any metadata mapped from XML to this class must be compared in the equals method. - any metadata mapped from XML to this class must be handled in the merge method. (merging is done at the accessor/mapping level) - any metadata mapped from XML to this class must be initialized in the initXMLObject method. - methods should be preserved in alphabetical order.
    Since:
    TopLink EJB 3.0 Reference Implementation
    Author:
    Guy Pelletier
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object objectToCompare)
        INTERNAL:
        Overrides:
        equals in class CollectionAccessor
      • getLoggingContext

        protected java.lang.String getLoggingContext()
        INTERNAL: Return the logging context for this accessor.
        Specified by:
        getLoggingContext in class RelationshipAccessor
      • process

        public void process()
        INTERNAL: Process a OneToMany accessor into an EclipseLink OneToManyMapping. If a JoinTable is found however, we must create a ManyToManyMapping.
        Overrides:
        process in class CollectionAccessor
      • processAssociationOverride

        protected void processAssociationOverride​(AssociationOverrideMetadata associationOverride,
                                                  org.eclipse.persistence.mappings.EmbeddableMapping embeddableMapping,
                                                  MetadataDescriptor owningDescriptor)
        INTERNAL: Process an association override for either an embedded object mapping, or a map mapping (element-collection, 1-M and M-M) containing an embeddable object as the value or key.
        Overrides:
        processAssociationOverride in class CollectionAccessor
      • processManyToManyMapping

        protected void processManyToManyMapping()
        INTERNAL: Process an many to many mapping for this accessor since a join table was specified.
      • processOneToManyMapping

        protected void processOneToManyMapping()
        INTERNAL: Process an one to many mapping for this accessor.
      • processUnidirectionalOneToManyMapping

        protected void processUnidirectionalOneToManyMapping()
        INTERNAL: Process an unidirectional one to many mapping for this accessor since join columns were specified and no mapped by value.
      • processUnidirectionalOneToManyTargetForeignKeyRelationship

        protected void processUnidirectionalOneToManyTargetForeignKeyRelationship​(org.eclipse.persistence.mappings.UnidirectionalOneToManyMapping mapping,
                                                                                  java.util.List<JoinColumnMetadata> joinColumns,
                                                                                  MetadataDescriptor owningDescriptor)
        INTERNAL: Process the join column(s) metadata for the owning side of a unidirectional one to many mapping. The default pk used only with single primary key entities. The processor should never get as far as to use them with entities that have a composite primary key (validation exception will be thrown).