Class VariableOneToOneAccessor


  • public class VariableOneToOneAccessor
    extends ObjectAccessor
    INTERNAL: A variable one to one relationship accessor. A VariableOneToOne annotation currently is not required to be defined on the accessible object, that is, a v1-1 can default if the raw class is an interface. 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:
    EclipseLink 1.0
    Author:
    Guy Pelletier
    • Field Detail

      • DEFAULT_QUERY_KEY

        public static final java.lang.String DEFAULT_QUERY_KEY
        See Also:
        Constant Field Values
    • Constructor Detail

      • VariableOneToOneAccessor

        public VariableOneToOneAccessor()
        INTERNAL: Used for OX mapping.
    • Method Detail

      • addDiscriminatorClassFor

        public void addDiscriminatorClassFor​(EntityAccessor accessor)
        INTERNAL: In stage 2 processing entities may be added to the discriminator class list for this variable one to one accessor if they were not explicitely added but define the interface associated with this accessors target interface.
      • equals

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

        public java.util.List<DiscriminatorClassMetadata> getDiscriminatorClasses()
        INTERNAL: Used for OX mapping.
      • getLoggingContext

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

        public MetadataDescriptor getReferenceDescriptor()
        INTERNAL: In a variable one to one case, there is no knowledge of a reference descriptor and the join columns should be defaulted based on the owner of the variable one to one's descriptor.
        Overrides:
        getReferenceDescriptor in class RelationshipAccessor
      • process

        public void process()
        INTERNAL: Process a variable one to one setting into an EclipseLink VariableOneToOneMapping.
        Overrides:
        process in class RelationshipAccessor
      • processForeignQueryKeyNames

        protected void processForeignQueryKeyNames​(org.eclipse.persistence.mappings.VariableOneToOneMapping mapping)
        INTERNAL:
      • setDiscriminatorClasses

        public void setDiscriminatorClasses​(java.util.List<DiscriminatorClassMetadata> discriminatorClasses)
        INTERNAL: Used for OX mapping.
      • setDiscriminatorColumn

        public void setDiscriminatorColumn​(DiscriminatorColumnMetadata discriminatorColumn)
        INTERNAL: Used for OX mapping.