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 CreateDatabaseObjectsAction

    java.lang.Object
      oracle.ifs.utils.action.AbstractAction
          oracle.ifs.admin.actions.JDBCAction
              oracle.ifs.admin.upgrade.common.CreateDatabaseObjectsAction

All Implemented Interfaces:
  Action, IfsParameters

Direct Known Subclasses:
  AddClassObjectAttributeAction, AlterIfsCredentialManager, PrepareAttributeColumns

    public abstract class CreateDatabaseObjectsAction

extends JDBCAction

CreateDatabaseObjectsAction is an abstract subclass of JDBCAction, which facilitates common SQL operations of creating and dropping tables, indexes, and sequences. It also provides a default implementation for stop() and failed().

(Unpublished)

Field Summary

Fields inherited from class oracle.ifs.admin.actions.JDBCAction
`NOLOG`

Fields inherited from class oracle.ifs.utils.action.AbstractAction
`CONTINUE_ON_ERROR, m_defaultOptions, m_options`

Fields inherited from interface oracle.ifs.utils.common.IfsParameters
`APPEND_LOG, DATABASE_URL, DB_USER_NAME, DB_USER_PASSWORD, DOMAIN_TYPE, ENABLE_SSL_SUPPORT, FOR_SCHEMA_UPGRADE, IFS_DOMAIN_DISPLAY_NAME, IFS_DOMAIN_NAME, IFS_SCHEMA_NAME, IFS_SCHEMA_PASSWORD, IFS_SERVICE_NAME, IFS_USER_NAME, IFS_USER_PASSWORD, INCLUDE_PATH, INITIAL_CONTEXT_FACTORY, LDAP_URL_DAS_LOOKUP, LDAP_USER_NAME, LDAP_USER_PASSWORD, OUTPUT_FILE, PARAMETER_FILE, REGISTRY, SCHEMA_VERSION_KEY, SECURITY_PROTOCOL_NAME, SERVICE_CONFIGURATION_NAME`

Constructor Summary
`CreateDatabaseObjectsAction()`

Method Summary
`protected void` | `analyze(java.sql.Connection conn, java.lang.String schemaName)` Analyze a schema.
`protected void` | `analyzeTable(java.sql.Connection conn, java.lang.String schemaName, java.lang.String tableName)` Analyze a table in a schema.
`protected void` | `closeResultSet(java.sql.ResultSet rset)` Close a ResultSet, ignoring any errors.
`protected void` | `closeStatement(java.sql.Statement stmt)` Close a Statement, ignoring any errors.
`protected boolean` | `columnExists(java.sql.Connection conn, java.lang.String tableName, java.lang.String columnName)` Return true if the specified column exists in the specified table.
`protected void` | `commit(java.sql.Connection conn)` Issue a commit
`protected void` | `createIndex(java.sql.Connection conn, java.lang.String indexName, java.lang.String tableName, java.lang.String[] columns, boolean isUnique)` Create an index on n columns of a table.
`protected void` | `createIndex(java.sql.Connection conn, java.lang.String indexName, java.lang.String tableName, java.lang.String[] columns, boolean isUnique, boolean dropAndRetryIfExists, boolean ignoreIfEquivalent)` Create an index on n columns of a table.
`protected void` | `createIndex(java.sql.Connection conn, java.lang.String indexName, java.lang.String tableName, java.lang.String columnName, boolean isUnique)` Create an index on a column of a table.
`protected void` | `createIndex(java.sql.Connection conn, java.lang.String indexName, java.lang.String tableName, java.lang.String columnName, boolean isUnique, boolean dropAndRetryIfExists, boolean ignoreIfEquivalent)` Create an index on a column of a table.
`protected void` | `createIndex(java.sql.Connection conn, java.lang.String indexName, java.lang.String tableName, java.lang.String columnName1, java.lang.String columnName2, boolean isUnique)` Create an index on 2 columns of a table.
`protected void` | `createIndex(java.sql.Connection conn, java.lang.String indexName, java.lang.String tableName, java.lang.String columnName1, java.lang.String columnName2, boolean isUnique, boolean dropAndRetryIfExists, boolean ignoreIfEquivalent)` Create an index on 2 columns of a table.
`protected void` | `createSequence(java.sql.Connection conn, java.lang.String seqName, int initialValue, int cacheSize)` Create a sequence.
`protected void` | `createTable(java.sql.Connection conn, java.lang.String tableName, java.lang.String createStmt)` Create a table.
`protected void` | `createView(java.sql.Connection conn, java.lang.String viewName, java.lang.String createStmt)` Create a view.
`protected void` | `dropIndex(java.sql.Connection conn, java.lang.String indexName)` Drop an index
`protected void` | `dropSequence(java.sql.Connection conn, java.lang.String seqName)` Drop a sequence
`protected void` | `dropTable(java.sql.Connection conn, java.lang.String tableName)` Drop a table.
`protected void` | `dropView(java.sql.Connection conn, java.lang.String viewName)` Drop a view.
`protected void` | `executeStatement(java.sql.Connection conn, java.lang.String stmtString)` Execute any SQL statement
`protected int` | `executeUpdate(java.sql.Connection conn, java.lang.String stmtString)` Execute an update statement.
`void` | `failed(java.lang.Throwable error)` Does nothing.
`protected long` | `getNextSequenceValue(java.sql.Connection conn, java.lang.String seqName)` Get a value from a sequence.
`java.lang.String` | `getSchemaName()` Gets the schema name.
`protected java.lang.String` | `getTimestamp()` Gets a timestamp to use in the logs.
`protected boolean` | `isValidConnection(java.sql.Connection conn)` Test validity of a Connection
`protected void` | `log(java.lang.String msg)` Add message to the log.
`protected void` | `log(java.lang.Throwable t)` Add message to the log.
`protected void` | `printStackTrace(java.lang.Throwable e)` Add stacktrace to the log.
`protected void` | `rollback(java.sql.Connection conn)` Issue a rollback
`protected boolean` | `rowExists(java.sql.Connection conn, java.lang.String tableName, java.lang.String condition)` Return true if there is a row that meets the specified condition for the specified table.
`protected boolean` | `rowExists(java.sql.Connection conn, java.lang.String tableName, java.lang.String condition, boolean errorValue)` Return true if there is a row that meets the specified condition for the specified table.
`void` | `stop()` Does nothing.
`protected boolean` | `tableExists(java.sql.Connection conn, java.lang.String tableName)` Return true if the specified table exists.

Methods inherited from class oracle.ifs.admin.actions.JDBCAction
`execute, perform, setDatabaseUrl, setPassword, setUser`

Methods inherited from class oracle.ifs.utils.action.AbstractAction
`getDescription, getName, getValue, isContinueOnError, putValue, setDefaultOptions, setDescription, setName, setOptions`

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

Constructor Detail

### CreateDatabaseObjectsAction

    public CreateDatabaseObjectsAction()

Method Detail

### stop

    public void stop()

  Description copied from class: `CreateDatabaseObjectsAction`
  Does nothing.

### failed

    public void failed(java.lang.Throwable error)

  Description copied from class: `CreateDatabaseObjectsAction`
  Does nothing.

  Parameters:
    `error` - the error that occurred.

### getSchemaName

    public java.lang.String getSchemaName()

  Description copied from class: `CreateDatabaseObjectsAction`
  Gets the schema name.

  Returns:
    the schema name
  (Unpublished)

### createTable

    protected void createTable(java.sql.Connection conn,
                               java.lang.String tableName,
                               java.lang.String createStmt)
                        throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Create a table.

  Parameters:
    `conn` - the database connection
    `tableName` - the name of the table
    `createStmt` - the CREATE TABLE sql string
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### createView

    protected void createView(java.sql.Connection conn,
                              java.lang.String viewName,
                              java.lang.String createStmt)
                       throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Create a view.

  Parameters:
    `conn` - the database connection
    `viewName` - the name of the view
    `createStmt` - the CREATE VIEW sql string
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### dropTable

    protected void dropTable(java.sql.Connection conn,
                             java.lang.String tableName)
                      throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Drop a table. Does not throw an exception if the attempt fails.

  Parameters:
    `conn` - the database connection
    `tableName` - the name of the table
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### dropView

    protected void dropView(java.sql.Connection conn,
                            java.lang.String viewName)
                     throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Drop a view. Does not throw an exception if the attempt fails.

  Parameters:
    `conn` - the database connection
    `viewName` - the name of the table
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### createIndex

    protected void createIndex(java.sql.Connection conn,
                               java.lang.String indexName,
                               java.lang.String tableName,
                               java.lang.String columnName,
                               boolean isUnique)
                        throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Create an index on a column of a table. If the index name is in use, it will be dropped and the creation will be retried. If an equivalent index exists for the column specified, the specified index will not be created, and no exception will be thrown.

  Parameters:
    `conn` - the database connection
    `indexName` - the name of the index
    `tableName` - the name of the table
    `columnName` - the name of the column
    `isUnique` - is the index to be a unique index?
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### createIndex

    protected void createIndex(java.sql.Connection conn,
                               java.lang.String indexName,
                               java.lang.String tableName,
                               java.lang.String columnName,
                               boolean isUnique,
                               boolean dropAndRetryIfExists,
                               boolean ignoreIfEquivalent)
                        throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Create an index on a column of a table.

  Parameters:
    `conn` - the database connection
    `indexName` - the name of the index
    `tableName` - the name of the table
    `columnName` - the name of the column
    `isUnique` - is the index to be a unique index?
    `dropAndRetryIfExists` - if index name exists, should it be dropped and creation retried?
    `ignoreIfEquivalent` - if another index exists on the specified columns, should the exception be ignored?
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### createIndex

    protected void createIndex(java.sql.Connection conn,
                               java.lang.String indexName,
                               java.lang.String tableName,
                               java.lang.String columnName1,
                               java.lang.String columnName2,
                               boolean isUnique)
                        throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Create an index on 2 columns of a table. If the index name is in use, it will be dropped and the creation will be retried. If an equivalent index exists for the columns specified, the specified index will not be created, and no exception will be thrown.

  Parameters:
    `conn` - the database connection
    `indexName` - the name of the index
    `tableName` - the name of the table
    `columnName1` - the name of the first column
    `columnName2` - the name of the second column
    `isUnique` - is the index to be a unique index?
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### createIndex

    protected void createIndex(java.sql.Connection conn,
                               java.lang.String indexName,
                               java.lang.String tableName,
                               java.lang.String columnName1,
                               java.lang.String columnName2,
                               boolean isUnique,
                               boolean dropAndRetryIfExists,
                               boolean ignoreIfEquivalent)
                        throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Create an index on 2 columns of a table.

  Parameters:
    `conn` - the database connection
    `indexName` - the name of the index
    `tableName` - the name of the table
    `columnName1` - the name of the first column
    `columnName2` - the name of the second column
    `isUnique` - is the index to be a unique index?
    `dropAndRetryIfExists` - if index name exists, should it be dropped and creation retried?
    `ignoreIfEquivalent` - if another index exists on the specified columns, should the exception be ignored?
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### createIndex

    protected void createIndex(java.sql.Connection conn,
                               java.lang.String indexName,
                               java.lang.String tableName,
                               java.lang.String[] columns,
                               boolean isUnique)
                        throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Create an index on n columns of a table. If the index name is in use, it will be dropped and the creation will be retried. If an equivalent index exists for the columns specified, the specified index will not be created, and no exception will be thrown.

  Parameters:
    `conn` - the database connection
    `indexName` - the name of the index
    `tableName` - the name of the table
    `columns` - the names of the columns
    `isUnique` - is the index to be a unique index?
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### createIndex

    protected void createIndex(java.sql.Connection conn,
                               java.lang.String indexName,
                               java.lang.String tableName,
                               java.lang.String[] columns,
                               boolean isUnique,
                               boolean dropAndRetryIfExists,
                               boolean ignoreIfEquivalent)
                        throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Create an index on n columns of a table.

  Parameters:
    `conn` - the database connection
    `indexName` - the name of the index
    `tableName` - the name of the table
    `columns` - the names of the columns
    `isUnique` - is the index to be a unique index?
    `dropAndRetryIfExists` - if index name exists, should it be dropped and creation retried?
    `ignoreIfEquivalent` - if another index exists on the specified columns, should the exception be ignored?
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### dropIndex

    protected void dropIndex(java.sql.Connection conn,
                             java.lang.String indexName)
                      throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Drop an index

  Parameters:
    `conn` - the database connection
    `indexName` - the name of the index
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### createSequence

    protected void createSequence(java.sql.Connection conn,
                                  java.lang.String seqName,
                                  int initialValue,
                                  int cacheSize)
                           throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Create a sequence. Assumes a few defaults: INCREMENT BY 1 NOMAXVALUE NOCYCLE

  Parameters:
    `conn` - the database connection
    `seqName` - the name of the seqeunce
    `initialValue` - the initial value
    `cacheSize` - the cache size
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### dropSequence

    protected void dropSequence(java.sql.Connection conn,
                                java.lang.String seqName)
                         throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Drop a sequence

  Parameters:
    `conn` - the database connection
    `seqName` - the name of the seqeunce
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### getNextSequenceValue

    protected long getNextSequenceValue(java.sql.Connection conn,
                                        java.lang.String seqName)
                                 throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Get a value from a sequence. Throws if the sequence does not exist.

  Parameters:
    `conn` - the database connection
    `seqName` - the sequence
  Returns:
    the next sequence value
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### executeStatement

    protected void executeStatement(java.sql.Connection conn,
                                    java.lang.String stmtString)
                             throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Execute any SQL statement

  Parameters:
    `conn` - the database connection
    `stmtString` - the SQL to execute
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### executeUpdate

    protected int executeUpdate(java.sql.Connection conn,
                                java.lang.String stmtString)
                         throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Execute an update statement. Returns the number of rows affected by the update.

  Parameters:
    `conn` - the database connection
    `stmtString` - the SQL to execute
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### rowExists

    protected boolean rowExists(java.sql.Connection conn,
                                java.lang.String tableName,
                                java.lang.String condition)
                         throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Return true if there is a row that meets the specified condition for the specified table. Throws if the table does not exist.

  Parameters:
    `conn` - the database connection
    `tableName` - the table name
    `condition` - the where clause
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### rowExists

    protected boolean rowExists(java.sql.Connection conn,
                                java.lang.String tableName,
                                java.lang.String condition,
                                boolean errorValue)

  Description copied from class: `CreateDatabaseObjectsAction`
  Return true if there is a row that meets the specified condition for the specified table. Return the specified "error" value if a SQL error occurs.

  Parameters:
    `conn` - the database connection
    `tableName` - the table name
    `condition` - the where clause
    `errorValue` - the value to return if the SQL fails
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### tableExists

    protected boolean tableExists(java.sql.Connection conn,
                                  java.lang.String tableName)
                           throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Return true if the specified table exists.

  Parameters:
    `conn` - the database connection
    `tableName` - the table name
  Returns:
    true if the table exists
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### columnExists

    protected boolean columnExists(java.sql.Connection conn,
                                   java.lang.String tableName,
                                   java.lang.String columnName)
                            throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Return true if the specified column exists in the specified table.

  Parameters:
    `conn` - the database connection
    `tableName` - the table name
    `columnName` - the column name
  Returns:
    true if the column exists
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### analyze

    protected void analyze(java.sql.Connection conn,
                           java.lang.String schemaName)
                    throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Analyze a schema.

  Parameters:
    `conn` - the database connection
    `schemaName` - the name of the schema to analyze
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### analyzeTable

    protected void analyzeTable(java.sql.Connection conn,
                                java.lang.String schemaName,
                                java.lang.String tableName)
                         throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Analyze a table in a schema.

  Parameters:
    `conn` - the database connection
    `schemaName` - the name of the schema containing the table
    `tableName` - the name of the table to analyze
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### commit

    protected void commit(java.sql.Connection conn)
                   throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Issue a commit

  Parameters:
    `conn` - the database connection
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### rollback

    protected void rollback(java.sql.Connection conn)
                     throws java.sql.SQLException

  Description copied from class: `CreateDatabaseObjectsAction`
  Issue a rollback

  Parameters:
    `conn` - the database connection
  Throws:
    `java.sql.SQLException` - if the operation fails
  (Unpublished)

### isValidConnection

    protected boolean isValidConnection(java.sql.Connection conn)

  Description copied from class: `CreateDatabaseObjectsAction`
  Test validity of a Connection

  Parameters:
    `conn` - the database connection
  Returns:
    true iff the connection is valid
  (Unpublished)

### closeResultSet

    protected void closeResultSet(java.sql.ResultSet rset)

  Description copied from class: `CreateDatabaseObjectsAction`
  Close a ResultSet, ignoring any errors.

  Parameters:
    `rset` - the ResultSet to close
  (Unpublished)

### closeStatement

    protected void closeStatement(java.sql.Statement stmt)

  Description copied from class: `CreateDatabaseObjectsAction`
  Close a Statement, ignoring any errors.

  Parameters:
    `stmt` - the statement to close
  (Unpublished)

### log

    protected void log(java.lang.String msg)

  Description copied from class: `CreateDatabaseObjectsAction`
  Add message to the log.

  Parameters:
    `msg` - the message to log
  (Unpublished)

### log

    protected void log(java.lang.Throwable t)

  Description copied from class: `CreateDatabaseObjectsAction`
  Add message to the log.

  Parameters:
    `t` - the throwable to log
  (Unpublished)

### printStackTrace

    protected void printStackTrace(java.lang.Throwable e)

  Description copied from class: `CreateDatabaseObjectsAction`
  Add stacktrace to the log.

  Parameters:
    `e` - the Throwable to log
  (Unpublished)

### getTimestamp

    protected java.lang.String getTimestamp()

  Description copied from class: `CreateDatabaseObjectsAction`
  Gets a timestamp to use in the logs.

  Returns:
    a timestamp for the current time
  (Unpublished)

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