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.actions
Class JDBCAction

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

All Implemented Interfaces:
  Action, IfsParameters

Direct Known Subclasses:
  AlterPasswordAction, CreateCredentialMgrSchemaAction, CreateDatabaseObjectsAction, CreateIfsCredentialManagerSchemaAction, CreateIfsSchemaAction, DropLykeIndexAction, DropNamedSchemaAction, DropSchemasAction, SetRepositoryParameterAction, SetSchemaVersionAction, UpdateUpgradeStatusAction, UpgradeCredentialManagerSchema

    public abstract class JDBCAction

extends AbstractAction
implements IfsParameters

The JDBCAction class is an Action implementation for executing JDBC statements. JDBCAction uses four options:
jdbc.user.name
jdbc.user.password
jdbc.database.url
nolog

(Unpublished)
Modified:
  sgarg 02/25/2002 Making use of IfsParmeters, sgarg 02/24/2002 Added "nolog" property., lsaenz 11/07/2000 Changed to use options rather than members., lsaenz 08/19/2000 Added printStackTrace upon failure., lsaenz 08/17/2000 Updated comments., lsaenz 07/31/2000 Updated comments., lsaenz 07/17/2000 Created.

Field Summary
`static java.lang.String` | `NOLOG` Option key "nolog" when "true" means not to establish a connection.

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
`JDBCAction()` Creates a new JDBCAction without specifying database credentials.
`JDBCAction(java.lang.String user, java.lang.String password, java.lang.String url)` Creates a new JDBCAction.

Method Summary
`abstract void` | `execute(java.sql.Connection con)` Executes JDBC statements.
`void` | `perform()` Performs this JDBCAction.
`void` | `setDatabaseUrl(java.lang.String url)` Sets the database URL to use when connecting.
`void` | `setPassword(java.lang.String password)` Sets the database user password.
`void` | `setUser(java.lang.String user)` Sets the the database user (schema) name to connect as.

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`

Methods inherited from interface oracle.ifs.utils.action.Action
`failed, stop`

Field Detail

### NOLOG

    public static final java.lang.String NOLOG

  Description copied from class: `JDBCAction`
  Option key "nolog" when "true" means not to establish a connection. This can be used when user wants to run a sql file which has connect statement within the file and thus at command line they specify "sqlplus /nolog" Defined as "nolog".

  See Also:
    Constant Field Values

Constructor Detail

### JDBCAction

    public JDBCAction()

  Creates a new JDBCAction without specifying database credentials.

### JDBCAction

    public JDBCAction(java.lang.String user,
                      java.lang.String password,
                      java.lang.String url)

  Creates a new JDBCAction.

  Parameters:
    `user` - the database user (schema) name to connect as.
    `password` - the database user's password.
    `url` - the database URL to use when connecting.

Method Detail

### setUser

    public void setUser(java.lang.String user)

  Description copied from class: `JDBCAction`
  Sets the the database user (schema) name to connect as.

  Parameters:
    `user` - the database user (schema) name to connect as.

### setPassword

    public void setPassword(java.lang.String password)

  Description copied from class: `JDBCAction`
  Sets the database user password.

  Parameters:
    `password` - the database user's password.

### setDatabaseUrl

    public void setDatabaseUrl(java.lang.String url)

  Description copied from class: `JDBCAction`
  Sets the database URL to use when connecting.

  Parameters:
    `url` - the database URL to use when connecting.

### perform

    public void perform()
                 throws ActionFailedException

  Description copied from class: `JDBCAction`
  Performs this JDBCAction. Opens a JDBC Connection to the specified database, invokes the execute method, passing it the Connection, and closes the Connection when the execute method returns.

  Specified by:
    `perform` in interface `Action`
  Throws:
    `ActionFailedException` - if this Action fails.

### execute

    public abstract void execute(java.sql.Connection con)
                          throws java.sql.SQLException,
                                 ActionFailedException

  Description copied from class: `JDBCAction`
  Executes JDBC statements.
  Note: Subclasses should provide an implementation for this method.
  The Connection does not need to be closed by this method; the calling method will close it. However, any Statement or ResultSet objects that are opened should be closed explicitly.

  Parameters:
    `con` - the Connection to the database.
  Throws:
    `java.sql.SQLException` - if a database error occurs.
    `ActionFailedException` - if any other error occurs.

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