Class EmbeddedAccessor

  • Direct Known Subclasses:
    DerivedIdClassAccessor, EmbeddedIdAccessor

    public class EmbeddedAccessor
    extends MappingAccessor
    An embedded relationship accessor. It may define all the same attributes as an entity, therefore, it also must handle nesting embedded's to the nth level. An embedded owning descriptor is a reference back to the actual owning entity's descriptor where the first embedded was discovered. 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
    • Constructor Detail

      • EmbeddedAccessor

        public EmbeddedAccessor()
        INTERNAL: Used for OX mapping.
      • EmbeddedAccessor

        protected EmbeddedAccessor​(java.lang.String xmlElement)
        INTERNAL:
    • Method Detail

      • addMapsIdAccessor

        public void addMapsIdAccessor​(MappingAccessor mapsIdAccessor)
        INTERNAL:
      • equals

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

        public java.util.List<AssociationOverrideMetadata> getAssociationOverrides()
        INTERNAL: Used for OX mapping.
      • getAttributeOverrides

        public java.util.List<AttributeOverrideMetadata> getAttributeOverrides()
        INTERNAL: Used for OX mapping.
      • getConverts

        public java.util.List<ConvertMetadata> getConverts()
        INTERNAL: Used for OX mapping.
      • setAssociationOverrides

        public void setAssociationOverrides​(java.util.List<AssociationOverrideMetadata> associationOverrides)
        INTERNAL: Used for OX mapping.
      • setAttributeOverrides

        public void setAttributeOverrides​(java.util.List<AttributeOverrideMetadata> attributeOverrides)
        INTERNAL: Used for OX mapping.
      • setConverts

        public void setConverts​(java.util.List<ConvertMetadata> converts)
        INTERNAL: Used for OX mapping.
      • updateDerivedIdField

        protected void updateDerivedIdField​(org.eclipse.persistence.mappings.EmbeddableMapping embeddableMapping,
                                            java.lang.String overrideName,
                                            org.eclipse.persistence.internal.helper.DatabaseField overrideField,
                                            MappingAccessor mappingAccessor)
        INTERNAL: Called when process the mapsId metadata. The id fields for this owning descriptor must have it's id fields update to those from the one to one accessor that maps them. We process embedded and embedded id mappings first, so by default they get mapped and processed as they normally would. When we go through the relationship accessors and discover a mapsId we then need to make some updates to our list of primary key fields.