java.lang.Object
org.eclipse.persistence.internal.jpa.metadata.ORMetadata
org.eclipse.persistence.internal.jpa.metadata.tables.IndexMetadata

public class IndexMetadata extends ORMetadata
INTERNAL: Object to hold onto database index 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.2
  • Constructor Details

    • IndexMetadata

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

      public IndexMetadata(MetadataAnnotation index, MetadataAccessor accessor)
      INTERNAL:
  • Method Details

    • equals

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

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

      public String getCatalog()
      INTERNAL: Used for OX mapping.
    • getColumnList

      public String getColumnList()
      INTERNAL: Used for OX mapping.
    • getColumnNames

      public List<String> getColumnNames()
      INTERNAL: Used for OX mapping.
    • getIdentifier

      protected String getIdentifier()
      INTERNAL: Sub classes that can uniquely be identified must override this method to allow the overriding and merging to uniquely identify objects. It will also be used when logging messages, that is, to provide a more detailed message.
      Overrides:
      getIdentifier in class ORMetadata
      See Also:
    • getName

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

      public String getSchema()
      INTERNAL: Used for OX mapping.
    • getTable

      public String getTable()
      INTERNAL: Used for OX mapping.
    • getUnique

      public Boolean getUnique()
      INTERNAL: Used for OX mapping.
    • hasName

      protected boolean hasName()
      INTERNAL: Return true is a name has been specified for this index.
    • isUnique

      protected boolean isUnique()
      INTERNAL: Return true is there is a unique setting for this index.
    • process

      public void process(DatabaseTable table)
      INTERNAL: Process the index metadata. This is called from all table metadata. CollectionTable, SecondaryTable, JoinTable, Table, TableGenerator.
    • process

      public void process(MetadataDescriptor descriptor, String defaultColumnName)
      INTERNAL: Process the index metadata. This is called from EntityAccessor and BasicAccesor (for Basic, Id and Version)
    • processName

      protected String processName(DatabaseTable table, IndexDefinition indexDefinition)
      INTERNAL: Process the name. If specified it, use it, otherwise create a default. e.g. INDEX_tablename_field1_field2_.....
    • setCatalog

      public void setCatalog(String catalog)
      INTERNAL: Used for OX mapping.
    • setColumnList

      public void setColumnList(String columnList)
      INTERNAL: Used for OX mapping.
    • setColumnNames

      public void setColumnNames(List<String> columnNames)
      INTERNAL: Used for OX mapping.
    • setName

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

      public void setSchema(String schema)
      INTERNAL: Used for OX mapping.
    • setTable

      public void setTable(String table)
      INTERNAL: Used for OX mapping.
    • setUnique

      public void setUnique(Boolean unique)
      INTERNAL: Used for OX mapping.