Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.admin.upgrade.common
Class ObjectIndexUtilities

    java.lang.Object
      oracle.ifs.admin.upgrade.common.ObjectIndexUtilities

    public class ObjectIndexUtilities

extends java.lang.Object

The ObjectIndexUtilities class provides static methods for dealing with indexes on iFS repository classobject attributes.

(Unpublished)

Constructor Summary
`ObjectIndexUtilities()`

Method Summary
`protected static void` | `closeResultSet(java.sql.ResultSet rset)` Try our best to close a resultSet; no exceptions thrown
`protected static void` | `closeStatement(java.sql.Statement stmt)` Try our best to close a Statement; no exceptions thrown
`static void` | `createIndex(java.sql.Connection con, java.lang.String tableSuffix, java.lang.String column)` Creates an index on an iFS classobject attribute.
`static void` | `dropIndex(java.sql.Connection con, java.lang.String tableSuffix, java.lang.String column)` Drops an index on an iFS classobject attribute.
`static java.lang.String` | `getIndexOnObjectAttribute(java.sql.Statement stmt, java.lang.String tableSuffix, java.lang.String column)` Returns the name of an index on an attribute of an object.
`static java.lang.Long` | `getObjectId(java.sql.Statement stmt, java.lang.String tableSuffix, java.lang.String column)` Get the Object ID for the Attribute of the specified table suffix and column.
`static void` | `updateIndexedAttribute(LibrarySession session, java.lang.String className, java.lang.String attrName, boolean newIsIndexedValue)` updateIndexedAttribute should be invoked after creating a new index on an attribute.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ObjectIndexUtilities

    public ObjectIndexUtilities()

Method Detail

### createIndex

    public static void createIndex(java.sql.Connection con,
                                   java.lang.String tableSuffix,
                                   java.lang.String column)
                            throws java.sql.SQLException

  Description copied from class: `ObjectIndexUtilities`
  Creates an index on an iFS classobject attribute. The ClassObject's databaseobject name (the table suffix) along with the Attribute's databaseobject name (the column name).

  Parameters:
    `con` - the JDBC connection to use for executing the query.
    `tableSuffix` - the suffix of the table the index is on; for example "document" for the odm_document table
    `column` - the column for the attribute
  Throws:
    `java.sql.SQLException` - if a database error occurs.

### dropIndex

    public static void dropIndex(java.sql.Connection con,
                                 java.lang.String tableSuffix,
                                 java.lang.String column)
                          throws java.sql.SQLException

  Description copied from class: `ObjectIndexUtilities`
  Drops an index on an iFS classobject attribute.

  Parameters:
    `con` - the JDBC connection to use for executing the query.
    `tableSuffix` - the suffix of the table the index is on; for example "document" for the odm_document table
    `column` - the column for the attribute
  Throws:
    `java.sql.SQLException` - if a database error occurs.

### getObjectId

    public static java.lang.Long getObjectId(java.sql.Statement stmt,
                                             java.lang.String tableSuffix,
                                             java.lang.String column)
                                      throws java.sql.SQLException

  Description copied from class: `ObjectIndexUtilities`
  Get the Object ID for the Attribute of the specified table suffix and column. Both strings specified are guaranteed to be in uppercase.

  Parameters:
    `stmt` - the JDBC statement to use for executing the query.
    `tableSuffix` - the suffix of the table the index is on; for example "document" for the odm_document table
    `column` - the column for the attribute
  Throws:
    `java.sql.SQLException` - if a database error occurs or if there is no column for the specified table suffix.

### getIndexOnObjectAttribute

    public static java.lang.String getIndexOnObjectAttribute(java.sql.Statement stmt,
                                                             java.lang.String tableSuffix,
                                                             java.lang.String column)
                                                      throws java.sql.SQLException

  Description copied from class: `ObjectIndexUtilities`
  Returns the name of an index on an attribute of an object. This method executes the following SQL command:
  `SELECT DISTINCT index_name FROM user_ind_columns x WHERE table_name = 'ODM_tableSuffix.toUpperCase()' AND column_name = 'column.toUpperCase()' AND 1 = (SELECT count(*) FROM user_ind_columns y WHERE y.table_name = 'ODM_tableSuffix.toUpperCase()' AND y.index_name = x.index_name)`

  Parameters:
    `stmt` - the Statement to use for executing the query.
    `tableSuffix` - the suffix of the table the index is on; for example "document" for the odm_document table
    `column` - the column the index is on.
  Returns:
    the index name, or null if none exist
  Throws:
    `java.sql.SQLException` - if a database error occurs.

### closeResultSet

    protected static void closeResultSet(java.sql.ResultSet rset)

  Description copied from class: `ObjectIndexUtilities`
  Try our best to close a resultSet; no exceptions thrown

  Parameters:
    `rset` - the ResultSet
  (Unpublished)

### closeStatement

    protected static void closeStatement(java.sql.Statement stmt)

  Description copied from class: `ObjectIndexUtilities`
  Try our best to close a Statement; no exceptions thrown

  Parameters:
    `stmt` - the Statement
  (Unpublished)

### updateIndexedAttribute

    public static void updateIndexedAttribute(LibrarySession session,
                                              java.lang.String className,
                                              java.lang.String attrName,
                                              boolean newIsIndexedValue)
                                       throws IfsException

  Description copied from class: `ObjectIndexUtilities`
  updateIndexedAttribute should be invoked after creating a new index on an attribute. The value of the Indexed attribute should be set to true. This method needs to be run in a separate LibrarySessionAction since the creation of the new index is done in a JDBCAction.

  Parameters:
    `session` - the current LibrarySession
    `className` - the class name of the ClassObject
    `attrName` - the attribute of the ClassObject
    `newIsIndexedValue` - new boolean setting for Indexed attribute
  Throws:
    `IfsException` - if the operation fails

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD