Class PlatformConfiguration
java.lang.Object
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.PlatformConfiguration
Encloses the platform configuration for the Ant tasks.
- Version:
- $Revision: 329426 $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the catalog pattern if any.Returns the database type.org.apache.commons.dbcp.BasicDataSource
Returns the data source to use for accessing the database.Creates the platform for the configured database.Returns the schema pattern if any.boolean
Determines whether the database shall be shut down after the task has finished.boolean
Determines whether a table's foreign keys read from a live database shall be sorted alphabetically.boolean
Determines whether delimited SQL identifiers shall be used (the default).void
setCatalogPattern
(String catalogPattern) Sets the catalog pattern.void
setDatabaseType
(String type) Sets the database type.void
setDataSource
(org.apache.commons.dbcp.BasicDataSource dataSource) Sets the data source to use for accessing the database.void
setSchemaPattern
(String schemaPattern) Sets the schema pattern.void
setShutdownDatabase
(boolean shutdownDatabase) Specifies whether the database shall be shut down after the task has finished.void
setSortForeignKeys
(boolean sortForeignKeys) Specifies whether a table's foreign keys read from a live database shall be sorted alphabetically.void
setUseDelimitedSqlIdentifiers
(boolean useDelimitedSqlIdentifiers) Specifies whether delimited SQL identifiers shall be used.
-
Constructor Details
-
PlatformConfiguration
public PlatformConfiguration()
-
-
Method Details
-
getDatabaseType
Returns the database type.- Returns:
- The database type
-
setDatabaseType
Sets the database type.- Parameters:
type
- The database type
-
getDataSource
public org.apache.commons.dbcp.BasicDataSource getDataSource()Returns the data source to use for accessing the database.- Returns:
- The data source
-
setDataSource
public void setDataSource(org.apache.commons.dbcp.BasicDataSource dataSource) Sets the data source to use for accessing the database.- Parameters:
dataSource
- The data source pointing to the database
-
getCatalogPattern
Returns the catalog pattern if any.- Returns:
- The catalog pattern
-
setCatalogPattern
Sets the catalog pattern.- Parameters:
catalogPattern
- The catalog pattern
-
getSchemaPattern
Returns the schema pattern if any.- Returns:
- The schema pattern
-
setSchemaPattern
Sets the schema pattern.- Parameters:
schemaPattern
- The schema pattern
-
isUseDelimitedSqlIdentifiers
public boolean isUseDelimitedSqlIdentifiers()Determines whether delimited SQL identifiers shall be used (the default).- Returns:
true
if delimited SQL identifiers shall be used
-
setUseDelimitedSqlIdentifiers
public void setUseDelimitedSqlIdentifiers(boolean useDelimitedSqlIdentifiers) Specifies whether delimited SQL identifiers shall be used.- Parameters:
useDelimitedSqlIdentifiers
-true
if delimited SQL identifiers shall be used
-
isSortForeignKeys
public boolean isSortForeignKeys()Determines whether a table's foreign keys read from a live database shall be sorted alphabetically. Isfalse
by default.- Returns:
true
if the foreign keys shall be sorted
-
setSortForeignKeys
public void setSortForeignKeys(boolean sortForeignKeys) Specifies whether a table's foreign keys read from a live database shall be sorted alphabetically.- Parameters:
sortForeignKeys
-true
if the foreign keys shall be sorted
-
isShutdownDatabase
public boolean isShutdownDatabase()Determines whether the database shall be shut down after the task has finished.- Returns:
true
if the database shall be shut down
-
setShutdownDatabase
public void setShutdownDatabase(boolean shutdownDatabase) Specifies whether the database shall be shut down after the task has finished.- Parameters:
shutdownDatabase
-true
if the database shall be shut down
-
getPlatform
Creates the platform for the configured database.- Returns:
- The platform
- Throws:
org.apache.tools.ant.BuildException
-