java.lang.Object
org.eclipse.persistence.internal.jpa.metadata.ORMetadata
org.eclipse.persistence.internal.jpa.metadata.mappings.MapKeyMetadata

public class MapKeyMetadata extends ORMetadata
Object to hold onto map key metadata. Key notes: - any metadata mapped from XML to this class must be compared in the equals method. - when loading from annotations, the constructor accepts the metadata accessor this metadata was loaded from. Used it to look up any 'companion' annotation needed for processing. - methods should be preserved in alphabetical order.
Since:
EclipseLink 2.0
  • Constructor Details

    • MapKeyMetadata

      public MapKeyMetadata()
      INTERNAL: Used for XML loading.
    • MapKeyMetadata

      public MapKeyMetadata(MetadataAccessor accessor)
      INTERNAL: Used for defaulting.
    • MapKeyMetadata

      public MapKeyMetadata(MetadataAnnotation mapKey, MetadataAccessor accessor)
      INTERNAL: Used for annotation loading.
  • Method Details

    • equals

      public boolean equals(Object objectToCompare)
      INTERNAL:
      Specified by:
      equals in class ORMetadata
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • hasName

      public boolean hasName()
      INTERNAL: Return true if a name has been specified.
    • process

      public String process(ContainerMapping mapping, MappingAccessor mappingAccessor)
      INTERNAL: Process a map key for a 1-M or M-M mapping. Will return the map key method name that should be use, null otherwise.
    • getName

      public String getName()
      INTERNAL: Used for OX mapping.
    • setName

      public void setName(String name)
      INTERNAL: Used for OX mapping.