com.ibm.tivoli.maximo.dbmanage

Class IndexDefinition

  • java.lang.Object
    • com.ibm.tivoli.maximo.dbmanage.IndexDefinition


  • public class IndexDefinition
    extends java.lang.Object
    Stores information about a Maximo index.
    • Constructor Summary

      Constructors 
      Constructor and Description
      IndexDefinition(java.sql.Connection connection, java.lang.String tbname)
      Constructor
      IndexDefinition(java.lang.String tbname)
      Constructor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addFirstKey(java.lang.String column, boolean ascending)
      Add a column to the beginning of the key list
      void addKey(java.lang.String column)
      Add a column to the index definition.
      void addKey(java.lang.String column, boolean ascending)
      Add a column to the end of the key list
      static java.util.List fetchIndexDefinition(java.sql.Connection connection, java.lang.String whereClause)
      Returns the definitions of indexes found with the where clause on the MaxSysIndexes table.
      java.lang.String getIndexName()
      Returns the index's name, if given at this point.
      java.lang.Object getKeyDef()
      Get the keys in a comma separated list.
      java.util.List getKeys()
      Returns a copy of the list of keys.
      java.lang.String getPartition() 
      java.lang.String getTable()
      Name of the table to index, in uppercase.
      void giveSuggestedName(java.lang.String ixname)
      Suggest a name for this index.
      boolean hasIndexName() 
      boolean hasPartition() 
      boolean includeTenantID() 
      void insertMetaData(java.sql.Connection connection)
      Insert the Maximo framework data for this index.
      java.lang.Boolean isClustered() 
      boolean isRequired() 
      boolean isTextSearch() 
      boolean isUnique() 
      void setClustered(boolean clusteredIndex)
      Set whether this is a clustered index.
      void setIncludeTenantID(boolean includeTenantID) 
      void setIndexName(java.lang.String ixname)
      Set the index's name.
      void setPartition(java.lang.String indexPartition)
      Returns the storage partition for the index.
      void setRequired(boolean required)
      Set whether this index is required by Maximo.
      void setTextSearch(boolean textSearchIndex)
      Set whether this is a text-search index, an Oracle-only structure.
      void setUnique(boolean uniqueIndex)
      Set whether this is a unique index.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IndexDefinition

        public IndexDefinition(java.lang.String tbname)
        Constructor
        Parameters:
        tbname - Name of the table to index.
      • IndexDefinition

        public IndexDefinition(java.sql.Connection connection,
                               java.lang.String tbname)
        Constructor
        Parameters:
        connection - Connection to the database.
        tbname - Name of the table to index.
    • Method Detail

      • addKey

        public void addKey(java.lang.String column)
        Add a column to the index definition.
        Parameters:
        column - Name of the column
      • giveSuggestedName

        public void giveSuggestedName(java.lang.String ixname)
        Suggest a name for this index. This name will be used for the index if the name is available.
        Parameters:
        ixname - Suggested name.
      • setUnique

        public void setUnique(boolean uniqueIndex)
        Set whether this is a unique index.
        Parameters:
        uniqueIndex -
      • setTextSearch

        public void setTextSearch(boolean textSearchIndex)
        Set whether this is a text-search index, an Oracle-only structure.
        Parameters:
        textSearchIndex -
      • setClustered

        public void setClustered(boolean clusteredIndex)
        Set whether this is a clustered index. There can be only one clustered index per table.
        Parameters:
        clusteredIndex -
      • addKey

        public void addKey(java.lang.String column,
                           boolean ascending)
        Add a column to the end of the key list
        Parameters:
        column -
        ascending -
      • getKeys

        public java.util.List getKeys()
        Returns a copy of the list of keys.
        Returns:
        List of keys.
      • addFirstKey

        public void addFirstKey(java.lang.String column,
                                boolean ascending)
        Add a column to the beginning of the key list
        Parameters:
        column - name of the column
        ascending - is it ascending?
      • getTable

        public java.lang.String getTable()
        Name of the table to index, in uppercase.
      • isClustered

        public java.lang.Boolean isClustered()
      • getKeyDef

        public java.lang.Object getKeyDef()
        Get the keys in a comma separated list.
      • isUnique

        public boolean isUnique()
      • getIndexName

        public java.lang.String getIndexName()
        Returns the index's name, if given at this point.
        Returns:
        The index's name in uppercase letters, or null.
      • setIndexName

        public void setIndexName(java.lang.String ixname)
        Set the index's name.
        Parameters:
        ixname - new name for the index.
      • hasIndexName

        public boolean hasIndexName()
      • setPartition

        public void setPartition(java.lang.String indexPartition)
        Returns the storage partition for the index.
        Parameters:
        indexPartition -
      • fetchIndexDefinition

        public static java.util.List fetchIndexDefinition(java.sql.Connection connection,
                                                          java.lang.String whereClause)
                                                   throws java.sql.SQLException
        Returns the definitions of indexes found with the where clause on the MaxSysIndexes table.
        Parameters:
        connection - Connection to the database
        whereClause - Where clause on the MaxSysIndexes table
        Returns:
        A list of index definitions
        Throws:
        java.sql.SQLException
      • setRequired

        public void setRequired(boolean required)
        Set whether this index is required by Maximo.
        Parameters:
        required -
      • isTextSearch

        public boolean isTextSearch()
      • getPartition

        public java.lang.String getPartition()
      • hasPartition

        public boolean hasPartition()
      • isRequired

        public boolean isRequired()
      • insertMetaData

        public void insertMetaData(java.sql.Connection connection)
                            throws java.sql.SQLException
        Insert the Maximo framework data for this index.
        Parameters:
        connection - Connection to the database.
        Throws:
        java.sql.SQLException
      • includeTenantID

        public boolean includeTenantID()
      • setIncludeTenantID

        public void setIncludeTenantID(boolean includeTenantID)