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
  • Field Details

  • Constructor Details

  • Method Details

    • 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(Object objectToCompare)
      INTERNAL:
      Overrides:
      equals in class ObjectAccessor
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ObjectAccessor
    • getDiscriminatorClasses

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

      public DiscriminatorColumnMetadata getDiscriminatorColumn()
      INTERNAL: Used for OX mapping.
    • getLoggingContext

      protected 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
    • initXMLObject

      public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)
      INTERNAL:
      Overrides:
      initXMLObject in class ObjectAccessor
    • isVariableOneToOne

      public boolean isVariableOneToOne()
      INTERNAL:
      Overrides:
      isVariableOneToOne in class MappingAccessor
    • 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(VariableOneToOneMapping mapping)
      INTERNAL:
    • setDiscriminatorClasses

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

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