org.apache.ddlutils.task
Class PlatformConfiguration

java.lang.Object
  extended by org.apache.ddlutils.task.PlatformConfiguration

public class PlatformConfiguration
extends Object

Encloses the platform configuration for the Ant tasks.

Version:
$Revision: 329426 $

Constructor Summary
PlatformConfiguration()
           
 
Method Summary
 String getCatalogPattern()
          Returns the catalog pattern if any.
 String getDatabaseType()
          Returns the database type.
 org.apache.commons.dbcp.BasicDataSource getDataSource()
          Returns the data source to use for accessing the database.
 Platform getPlatform()
          Creates the platform for the configured database.
 String getSchemaPattern()
          Returns the schema pattern if any.
 boolean isShutdownDatabase()
          Determines whether the database shall be shut down after the task has finished.
 boolean isSortForeignKeys()
          Determines whether a table's foreign keys read from a live database shall be sorted alphabetically.
 boolean isUseDelimitedSqlIdentifiers()
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlatformConfiguration

public PlatformConfiguration()
Method Detail

getDatabaseType

public String getDatabaseType()
Returns the database type.

Returns:
The database type

setDatabaseType

public void setDatabaseType(String type)
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

public String getCatalogPattern()
Returns the catalog pattern if any.

Returns:
The catalog pattern

setCatalogPattern

public void setCatalogPattern(String catalogPattern)
Sets the catalog pattern.

Parameters:
catalogPattern - The catalog pattern

getSchemaPattern

public String getSchemaPattern()
Returns the schema pattern if any.

Returns:
The schema pattern

setSchemaPattern

public void setSchemaPattern(String schemaPattern)
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. Is false 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

public Platform getPlatform()
                     throws org.apache.tools.ant.BuildException
Creates the platform for the configured database.

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


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