com.ibm.tivoli.maximo.dbmanage.connection

Class MaximoIndex

  • java.lang.Object
    • com.ibm.tivoli.maximo.dbmanage.connection.MaximoIndex


  • public class MaximoIndex
    extends java.lang.Object
    Maximo Index related methods.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static AttributeStorageDefinition MSI_Store
      Returned information about the found key: name, uniquerule, clusterrule, required, textsearch.
    • Constructor Summary

      Constructors 
      Constructor and Description
      MaximoIndex(java.sql.Connection connection)
      Constructor
    • Field Detail

      • MSI_Store

        public static final AttributeStorageDefinition MSI_Store
        Returned information about the found key: name, uniquerule, clusterrule, required, textsearch.
    • Constructor Detail

      • MaximoIndex

        public MaximoIndex(java.sql.Connection connection)
                    throws java.sql.SQLException
        Constructor
        Parameters:
        connection -
        Throws:
        java.sql.SQLException
    • Method Detail

      • findIndexQuery

        public static java.lang.String findIndexQuery(java.lang.String table,
                                                      boolean isTextSearch,
                                                      java.util.List keyList)
        Create a query to find an index in the Maximo framework tables.
        Parameters:
        table - The name of the table.
        isTextSearch - Is this a text search table?
        keyList - The ordered list of columns in the index
        Returns:
        A query that is meant to be used with MSI_Store to get additional information about the index.
        See Also:
        MaximoIndex.MSI_Store
      • findIndexQuery

        public static java.lang.String findIndexQuery(java.lang.String table,
                                                      boolean isTextSearch,
                                                      java.lang.String[] keys)
        Create a query to find an index in the Maximo framework tables.
        Parameters:
        table - The name of the table.
        isTextSearch - Is this a text search table?
        keys - The ordered list of columns in the index
        Returns:
        A query that is meant to be used with MSI_Store to get additional information about the index.
        See Also:
        MaximoIndex.MSI_Store
      • findIndexQuery

        public static java.lang.String findIndexQuery(java.lang.String table,
                                                      java.lang.String conditions,
                                                      java.lang.String[] keys)
        Create a query to find an index in the Maximo framework tables.
        Parameters:
        table - The name of the table.
        conditions - Additional where conditions, i.e. "textsearch = 1"
        keys - The ordered list of columns in the index
        Returns:
        A query that is meant to be used with MSI_Store to get additional information about the index.
        See Also:
        MaximoIndex.MSI_Store
      • createMaximoIndex

        public void createMaximoIndex(IndexDefinition id)
                               throws java.lang.Exception
        Create a Maximo Index given the index definition. The name of the index may be different than the given index definition if that name is already used. The parameter will be updated with the index name ultimately used.
        Parameters:
        id - Definition of the index.
        Throws:
        java.lang.Exception
      • getStorageForIndex

        public void getStorageForIndex(IndexDefinition id)
                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • doCreateIndex

        public void doCreateIndex(IndexDefinition id)
                           throws java.lang.Exception
        Try to build the index specified by the parameter. Does not update the Maximo framework tables. The final name of the index will be placed in the parameter object.
        Parameters:
        id - The index definition.
        Throws:
        java.lang.Exception
      • getDefaultIndexPartition

        public java.lang.String getDefaultIndexPartition()
                                                  throws java.sql.SQLException
        Return the default index partition
        Throws:
        java.sql.SQLException
      • getDefaultStoragePartition

        public final java.lang.String getDefaultStoragePartition()
                                                          throws java.sql.SQLException
        Get the Maximo database's default index partition.
        Throws:
        java.sql.SQLException
      • dropIndex

        public void dropIndex(IndexDefinition id)
                       throws java.sql.SQLException
        Drop the index named by the Index Definition. This method doesn't search for the index using the key definition.
        Parameters:
        id -
        Throws:
        java.sql.SQLException
      • suggestedIxname

        public static java.lang.String suggestedIxname(java.lang.String tbname,
                                                       java.lang.String suffix)
      • dropMaximoIndex

        public void dropMaximoIndex(IndexDefinition dropId)
                             throws java.sql.SQLException
        Drop the maximo index that matches the definition given. The index is dropped and the meta data is removed from the framework tables. Uses the index name if it is given.
        Parameters:
        dropId - Definition of the index to drop.
        Throws:
        java.sql.SQLException
      • dropIndexMeta

        public void dropIndexMeta(IndexDefinition id)
                           throws java.sql.SQLException
        Removes references in the Maximo framework tables to the index given.
        Parameters:
        id -
        Throws:
        java.sql.SQLException