Class 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
    Author:
    James Sutherland
    • Constructor Detail

      • IndexMetadata

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

      • 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.
      • 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.