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

## org.apache.ddlutils.task
Class DatabaseCommand

    java.lang.Object
      org.apache.ddlutils.task.Command
          org.apache.ddlutils.task.DatabaseCommand

Direct Known Subclasses:
  ConvertingDatabaseCommand, CreateDatabaseCommand, DatabaseCommandWithCreationParameters, DropDatabaseCommand

    public abstract class DatabaseCommand

extends Command

Base type for commands that have the database info embedded.

Version:
  $Revision: 289996 $

Field Summary

Fields inherited from class org.apache.ddlutils.task.Command
`_log`

Constructor Summary
`DatabaseCommand()`

Method Summary
`String` | `getCatalogPattern()` Returns the catalog pattern if any.
`protected String` | `getDatabaseType()` Returns the database type.
`protected org.apache.commons.dbcp.BasicDataSource` | `getDataSource()` Returns the data source to use for accessing the database.
`protected Platform` | `getPlatform()` Creates the platform for the configured database.
`String` | `getSchemaPattern()` Returns the schema pattern if any.
`boolean` | `isRequiringModel()` Specifies whether this command requires a model, i.e.
`protected void` | `setPlatformConfiguration(PlatformConfiguration platformConf)` Sets the platform configuration.

Methods inherited from class org.apache.ddlutils.task.Command
`execute, handleException, isFailOnError, setFailOnError`

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

Constructor Detail

### DatabaseCommand

    public DatabaseCommand()

Method Detail

### getDatabaseType

    protected String getDatabaseType()

  Returns the database type.

  Returns:
    The database type

### getDataSource

    protected org.apache.commons.dbcp.BasicDataSource getDataSource()

  Returns the data source to use for accessing the database.

  Returns:
    The data source

### getCatalogPattern

    public String getCatalogPattern()

  Returns the catalog pattern if any.

  Returns:
    The catalog pattern

### getSchemaPattern

    public String getSchemaPattern()

  Returns the schema pattern if any.

  Returns:
    The schema pattern

### setPlatformConfiguration

    protected void setPlatformConfiguration(PlatformConfiguration platformConf)

  Sets the platform configuration.

  Parameters:
    `platformConf` - The platform configuration

### getPlatform

    protected Platform getPlatform()
                            throws org.apache.tools.ant.BuildException

  Creates the platform for the configured database.

  Returns:
    The platform
  Throws:
    `org.apache.tools.ant.BuildException`

### isRequiringModel

    public boolean isRequiringModel()

  Specifies whether this command requires a model, i.e. whether the second argument in `Command.execute(DatabaseTaskBase, Database)` cannot be `null`.

  Specified by:
    `isRequiringModel` in class `Command`
  Returns:
    `true` if this command requires a model

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

Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.