Class DatabaseCommand
java.lang.Object
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.Command
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.DatabaseCommand
- Direct Known Subclasses:
ConvertingDatabaseCommand,CreateDatabaseCommand,DatabaseCommandWithCreationParameters,DropDatabaseCommand
Base type for commands that have the database info embedded.
- Version:
- $Revision: 289996 $
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the catalog pattern if any.protected StringReturns the database type.protected org.apache.commons.dbcp.BasicDataSourceReturns the data source to use for accessing the database.protected PlatformCreates the platform for the configured database.Returns the schema pattern if any.booleanSpecifies whether this command requires a model, i.e. whether the second argument inCommand.execute(DatabaseTaskBase, Database)cannot benull.protected voidsetPlatformConfiguration(PlatformConfiguration platformConf) Sets the platform configuration.Methods inherited from class edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.Command
execute, handleException, isFailOnError, setFailOnError
-
Constructor Details
-
DatabaseCommand
public DatabaseCommand()
-
-
Method Details
-
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
Returns the catalog pattern if any.- Returns:
- The catalog pattern
-
getSchemaPattern
Returns the schema pattern if any.- Returns:
- The schema pattern
-
setPlatformConfiguration
Sets the platform configuration.- Parameters:
platformConf- The platform configuration
-
getPlatform
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 inCommand.execute(DatabaseTaskBase, Database)cannot benull.- Specified by:
isRequiringModelin classCommand- Returns:
trueif this command requires a model
-