public abstract class SchemaSpecTask
extends org.apache.tools.ant.Task
| Constructor and Description |
|---|
SchemaSpecTask() |
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection()
Returns a database connection this task can use.
|
DatabaseType |
getDatabaseType()
Returns the type of database being upgraded.
|
String |
getDBSpecificTypeName(String generic_type_name)
Returns the database-specific type name for the given generic type.
|
String |
getIgnoreError() |
Connection |
getNewConnection()
Get a new connection from this task's owning
DBUpgrader object. |
String |
getTargetDBVendor()
Sets the vendor name of the target DB where this SQL should run.
|
String |
getTargetDBVersion()
Gets the version string of the target DB where this SQL should run.
|
void |
initialize(Connection db_conn,
DBUpgrader db_upgrader)
Initializes this task with a database connection and a
DBUpgrader object. |
boolean |
isDBTargeted()
Returns
true if this task's database is targeted for this schema spec. |
boolean |
isIgnoreError() |
void |
setIgnoreError(String ignoreError) |
void |
setTargetDBVendor(String vendor)
Sets the vendor name of the target DB where this SQL should run.
|
void |
setTargetDBVersion(String version)
Sets the version string of the target DB where this SQL should run.
|
int |
translateSqlType(String generic_type_name)
Given a generic type name, this returns the
Types integer value of that type. |
execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypepublic void setTargetDBVendor(String vendor)
vendor - database vendorpublic void setTargetDBVersion(String version)
version - database versionpublic String getTargetDBVendor()
public String getTargetDBVersion()
public String getIgnoreError()
public void setIgnoreError(String ignoreError)
public boolean isIgnoreError()
public boolean isDBTargeted()
true if this task's database is targeted for this schema spec. Note that if
getTargetDBVendor() is not specified, then any specified getTargetDBVersion() will cause a
build exception to occur. You cannot specific a version string without indicating which vendor's database you are
talking about.true if this schema spec task should run; false if this task's database is not
targeted and thus this task should not executegetTargetDBVendor(),
getTargetDBVersion()public void initialize(Connection db_conn, DBUpgrader db_upgrader)
DBUpgrader object.db_conn - db_upgrader - public Connection getConnection()
public Connection getNewConnection() throws SQLException
DBUpgrader object.SQLExceptionpublic DatabaseType getDatabaseType()
public int translateSqlType(String generic_type_name) throws org.apache.tools.ant.BuildException
Types integer value of that type. In effect, it maps
the generic type name with the JDBC SQL type ID.generic_type_name - org.apache.tools.ant.BuildException - if the type is not a known or supported typepublic String getDBSpecificTypeName(String generic_type_name) throws org.apache.tools.ant.BuildException
generic_type_name - org.apache.tools.ant.BuildException - no database specific type name was definedCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.