Class IndexMetaData

  • Direct Known Subclasses:
    PostgresIndexMetaData

    public class IndexMetaData
    extends java.lang.Object
    Meta data for an index.
    Author:
    harald
    • Constructor Detail

      • IndexMetaData

        public IndexMetaData​(TableMetaData tableMetaData)
        Creates an index meta data object.
        Parameters:
        tableMetaData - the table the index belongs to
    • Method Detail

      • setupIndexFromMetaData

        public void setupIndexFromMetaData​(java.sql.ResultSet resultSet)
                                    throws java.sql.SQLException
        Sets up the index from the database meta data result.
        Parameters:
        resultSet - the column result set
        Throws:
        java.sql.SQLException - the processing the result set failed
      • addIndexColumnFromMetaData

        public void addIndexColumnFromMetaData​(java.sql.ResultSet resultSet)
                                        throws java.sql.SQLException
        Adds an index column from the database meta data result.
        Parameters:
        resultSet - the column result set
        Throws:
        java.sql.SQLException - the processing the result set failed
      • getTableMetaData

        public TableMetaData getTableMetaData()
        Gets the table.
        Returns:
        the table meta data
      • getColumns

        public java.util.List<IndexColumnMetaData> getColumns()
        Gets the columns.
        Returns:
        the columns for this index
      • getIndexName

        public java.lang.String getIndexName()
        Gets the index name.
        Returns:
        the name in lowercase without schema
      • setIndexName

        public void setIndexName​(java.lang.String indexName)
        Sets the index name.
        Parameters:
        indexName - the name in lowercase without schema
      • isUnique

        public boolean isUnique()
        Returns whether index is unique.
        Returns:
        true if unique
      • setUnique

        public void setUnique​(boolean unique)
        Sets whether index is unique.
        Parameters:
        unique - true if unique
      • getFilterCondition

        public java.lang.String getFilterCondition()
        Gets the filter condition.
        Returns:
        the filter, null if none
      • setFilterCondition

        public void setFilterCondition​(java.lang.String filterCondition)
        Sets the filter condition.
        Parameters:
        filterCondition - the filter, null if none
      • isPrimaryIdKey

        public boolean isPrimaryIdKey()
        Returns whether this is the primary key for the object id.
        Returns:
        true if object id key
      • validate

        public void validate()
        Validates and postprocesses the index data.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object