Class Index

    • Field Detail

      • EXTENSION_INDEX_EXTENDED_SETTING

        public static final java.lang.String EXTENSION_INDEX_EXTENDED_SETTING
        See Also:
        Constant Field Values
      • EXTENSION_INDEX_TYPE

        public static final java.lang.String EXTENSION_INDEX_TYPE
        See Also:
        Constant Field Values
      • isUnique

        private final boolean isUnique
    • Constructor Detail

      • Index

        public Index​(Table table,
                     boolean isUnique,
                     java.util.Map<java.lang.String,​java.lang.String> extensions)
        Constructor.
        Parameters:
        table - The table
        isUnique - Whether the index is unique
        extensions - Any extensions for the index
      • Index

        public Index​(CandidateKey ck)
        Constructor for an index for the specified candidate key.
        Parameters:
        ck - Candidate key to use as a basis
      • Index

        public Index​(ForeignKey fk)
        Constructor for an index for the specified foreign key.
        Parameters:
        fk - Foreign key to use as a basis
    • Method Detail

      • getUnique

        public boolean getUnique()
        Accessor for whether the index is unique
        Returns:
        Whether it is unique.
      • hashCode

        public int hashCode()
        Hashcode operator.
        Overrides:
        hashCode in class Key
        Returns:
        The hashcode
      • equals

        public boolean equals​(java.lang.Object obj)
        Equality operator.
        Overrides:
        equals in class Key
        Parameters:
        obj - Object to compare against
        Returns:
        Whether they are equal.
      • toString

        public java.lang.String toString()
        Stringify method. Generates a form of the index ready to be used in a DDL statement. e.g
        INDEX (col1, col2)
        Overrides:
        toString in class java.lang.Object
        Returns:
        String version of this object.