Top Description Inners Fields Constructors Methods
org.apache.tools.ant.taskdefs

public Class SQLExec

extends JDBCTask
Class Inheritance
Imports
java.io.BufferedOutputStream, .BufferedReader, .File, .IOException, .InputStreamReader, .OutputStream, .PrintStream, .Reader, .StringReader, java.nio.charset.Charset, java.sql.Blob, .Connection, .ResultSet, .ResultSetMetaData, .SQLException, .SQLWarning, .Statement, .Types, java.util.List, .Locale, .StringTokenizer, .Vector, org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.types.EnumeratedAttribute, .FileSet, .Resource, .ResourceCollection, org.apache.tools.ant.types.resources.Appendable, .FileProvider, .FileResource, .Union, org.apache.tools.ant.util.FileUtils, .KeepAliveOutputStream, .StringUtils

Executes a series of SQL statements on a database using JDBC.

Statements can either be read in from a text file using the src attribute or from between the enclosing SQL tags.

Multiple statements can be provided, separated by semicolons (or the defined delimiter). Individual lines within the statements can be commented using either --, // or REM at the start of the line.

The autocommit attribute specifies whether auto-commit should be turned on or off whilst executing the statements. If auto-commit is turned on each statement will be executed and committed. If it is turned off the statements will all be executed as one transaction.

The onerror attribute specifies how to proceed when an error occurs during the execution of one of the statements. The possible values are: continue execution, only show the error; stop execution and commit transaction; and abort execution and transaction and fail task.

Since
Ant 1.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
SQLExec.DelimiterType

delimiters we support, "normal" and "row"

public static class
SQLExec.OnError

The action a task should perform on an error, one of "continue", "stop" and "abort"

public class
SQLExec.Transaction

Contains the definition of a new transaction element.

Field Summary

Modifier and TypeField and Description
private boolean
append

Append to an existing file or overwrite it?

private Connection
conn

Database connection

private String
csvColumnSep

The column separator used when printing the results.

private String
csvQuoteChar

The character used to quote column values.

private String
delimiter

SQL Statement delimiter

private String
delimiterType

The delimiter type indicating whether the delimiter will only be recognized on a line by itself

private String
encoding

Encoding to use when reading SQL statements from a file

private String
errorProperty

The name of the property to set in the event of an error

private boolean
escapeProcessing

Argument to Statement.setEscapeProcessing

private boolean
expandProperties

should properties be expanded in text?

private boolean
forceCsvQuoteChar

The name of the property to force the csv quote character

private int
private boolean
keepformat

Keep the format of a sql block?

private String
onError

Action to perform if an error is found

private Resource
output

Results Output Resource.

private String
outputEncoding

Output encoding.

private boolean
print

Print SQL results.

private boolean
rawBlobs

should we print raw BLOB data?

private Union
resources

files to load

private String
rowCountProperty

The name of the property that receives the number of rows returned

private boolean
showheaders

Print header columns.

private boolean
showtrailers

Print SQL stats (rows affected)

private boolean
showWarnings

whether to show SQLWarnings as WARN messages.

private String
sqlCommand

SQL input command

private File
srcFile

SQL input file

private Statement
statement

SQL statement

private boolean
strictDelimiterMatching

delimiters must match in case and whitespace is significant.

private int
private List<SQLExec.Transaction>
transactions

SQL transactions to perform

private boolean
treatWarningsAsErrors

Whether a warning is an error - in which case onError applies.

private String
warningProperty

The name of the property to set in the event of a warning

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(ResourceCollection
a collection of resources containing SQL commands, each resource is run in a separate transaction.
rc
)

Adds a collection of resources (nested element).

public void
addFileset(FileSet
a set of files contains SQL commands, each File is run in a separate transaction.
set
)

Adds a set of files (nested fileset attribute).

public void
addText(String
an inline string containing the SQL command.
sql
)

Set an inline SQL command to execute.

private void
public SQLExec.Transaction

Returns:

a Transaction to be configured.
createTransaction
()

Add a SQL transaction to execute

protected void
execSQL(String
the SQL statement to execute
sql
,
PrintStream
the place to put output
out
)

Exec the sql statement.

public void
execute()

Overrides org.apache.tools.ant.Task.execute.

Load the sql file and then execute it
protected Connection
getConnection()

Overrides org.apache.tools.ant.taskdefs.JDBCTask.getConnection.

Caches the connection returned by the base class's getConnection method.
public boolean

Returns:

true if properties are to be expanded.
getExpandProperties
()

is property expansion inside inline text enabled?

protected Statement

Returns:

Statement
getStatement
()

Creates and configures a Statement instance which is then cached for subsequent calls.

public int
private String
protected void
printResults(PrintStream
the place to print results
out
)

Deprecated since 1.6.x. Use the two arg version instead.
print any results in the statement
protected void
printResults(ResultSet
the resultset to print information about
rs
,
PrintStream
the place to print results
out
)

print any results in the result set.

private void
printValue(ResultSet rs, int col, PrintStream out)

private void
printWarnings(SQLWarning warning, boolean force)

protected void
runStatements(Reader
the reader contains sql lines.
reader
,
PrintStream
the place to output results.
out
)

read in lines and execute them

public void
setAppend(boolean
if true append to an existing file.
append
)

whether output should be appended to or overwrite an existing file.

public void
setCsvColumnSeparator(String
String
s
)

The column separator used when printing the results.

public void
setCsvQuoteCharacter(String
String
s
)

The character used to quote column values.

public void
setDelimiter(String
the separator.
delimiter
)

Set the delimiter that separates SQL statements.

public void
setDelimiterType(SQLExec.DelimiterType
the type of delimiter - "normal" or "row".
delimiterType
)

Set the delimiter type: "normal" or "row" (default "normal").

public void
setEncoding(String
the encoding to use on the files
encoding
)

Set the file encoding to use on the SQL files read in

public void
setErrorProperty(String
the name of the property to set in the event of an error.
errorProperty
)

Property to set to "true" if a statement throws an error.

protected final void
public void
setEscapeProcessing(boolean
if true enable escape processing, default is true.
enable
)

Set escape processing for statements.

public void
setExpandProperties(boolean
if true expand properties.
expandProperties
)

Enable property expansion inside nested text

public void
setForceCsvQuoteChar(boolean
boolean
forceCsvQuoteChar
)

Force the csv quote character

public void
setKeepformat(boolean
The keepformat to set
keepformat
)

whether or not format should be preserved.

public void
setOnerror(SQLExec.OnError
the action to perform on statement failure.
action
)

Action to perform when statement fails: continue, stop, or abort optional; default "abort"

public void
setOutput(File
the output file to use for logging messages.
output
)

Set the output file; optional, defaults to the Ant log.

public void
setOutput(Resource
the output Resource to store results.
output
)

Set the output Resource; optional, defaults to the Ant log.

public void
setOutputEncoding(String
the name of the encoding or null for the platform's default encoding
outputEncoding
)

The encoding to use when writing the result to a resource.

public void
setPrint(boolean
if true print result sets.
print
)

Print result sets from the statements; optional, default false

private void
setProperty(String name, String value)

public void
setRawBlobs(boolean
whether to print raw BLOBs.
rawBlobs
)

Set whether to print raw BLOBs rather than their string (hex) representations.

public void
setRowCountProperty(String
String
rowCountProperty
)

Sets a given property to the number of rows in the first statement that returned a row count.

protected final void
setRowCountProperty(int rowCount)

public void
setShowheaders(boolean
if true print headers of result sets.
showheaders
)

Print headers for result sets from the statements; optional, default true.

public void
setShowtrailers(boolean
if true prints the SQL rows affected
showtrailers
)

Print trailing info (rows affected) for the SQL Addresses Bug/Request #27446

public void
setShowWarnings(boolean
boolean
b
)

whether to show SQLWarnings as WARN messages.

public void
setSrc(File
the file containing the SQL command.
srcFile
)

Set the name of the SQL file to be run.

public void
setStrictDelimiterMatching(boolean
boolean
b
)

If false, delimiters will be searched for in a case-insensitive manner (i.e. delimiter="go" matches "GO") and surrounding whitespace will be ignored (delimiter="go" matches "GO ").

public void
setTreatWarningsAsErrors(boolean
boolean
b
)

Whether a warning is an error - in which case onError applies.

public void
setWarningProperty(String
the name of the property to set in the event of a warning.
warningProperty
)

Property to set to "true" if a statement produces a warning.

protected final void
Inherited from org.apache.tools.ant.taskdefs.JDBCTask:
addConnectionPropertycreateClasspathgetClasspathgetLoadergetLoaderMapgetPasswordgetRdbmsgetUrlgetUserIdgetVersionisAutocommitisCachingisValidRdbmssetAutocommitsetCachingsetClasspathsetClasspathRefsetDriversetFailOnConnectionErrorsetPasswordsetRdbmssetUrlsetUseridsetVersion

Field Detail

appendback to summary
private boolean append

Append to an existing file or overwrite it?

connback to summary
private Connection conn

Database connection

csvColumnSepback to summary
private String csvColumnSep

The column separator used when printing the results.

Defaults to ","

Since
Ant 1.8.0
csvQuoteCharback to summary
private String csvQuoteChar

The character used to quote column values.

If set, columns that contain either the column separator or the quote character itself will be surrounded by the quote character. The quote character itself will be doubled if it appears inside of the column's value.

If this value is not set (the default), no column values will be quoted, not even if they contain the column separator.

Note: BLOB values will never be quoted.

Defaults to "not set"

Since
Ant 1.8.0
delimiterback to summary
private String delimiter

SQL Statement delimiter

delimiterTypeback to summary
private String delimiterType

The delimiter type indicating whether the delimiter will only be recognized on a line by itself

encodingback to summary
private String encoding

Encoding to use when reading SQL statements from a file

errorPropertyback to summary
private String errorProperty

The name of the property to set in the event of an error

Since
Ant 1.8.0
escapeProcessingback to summary
private boolean escapeProcessing

Argument to Statement.setEscapeProcessing

Since
Ant 1.6
expandPropertiesback to summary
private boolean expandProperties

should properties be expanded in text? false for backwards compatibility

Since
Ant 1.7
forceCsvQuoteCharback to summary
private boolean forceCsvQuoteChar

The name of the property to force the csv quote character

goodSqlback to summary
private int goodSql
keepformatback to summary
private boolean keepformat

Keep the format of a sql block?

onErrorback to summary
private String onError

Action to perform if an error is found

outputback to summary
private Resource output

Results Output Resource.

outputEncodingback to summary
private String outputEncoding

Output encoding.

printback to summary
private boolean print

Print SQL results.

rawBlobsback to summary
private boolean rawBlobs

should we print raw BLOB data?

Since
Ant 1.7.1
resourcesback to summary
private Union resources

files to load

rowCountPropertyback to summary
private String rowCountProperty

The name of the property that receives the number of rows returned

Since
Ant 1.8.0
showheadersback to summary
private boolean showheaders

Print header columns.

showtrailersback to summary
private boolean showtrailers

Print SQL stats (rows affected)

showWarningsback to summary
private boolean showWarnings

whether to show SQLWarnings as WARN messages.

Since
Ant 1.8.0
sqlCommandback to summary
private String sqlCommand

SQL input command

srcFileback to summary
private File srcFile

SQL input file

statementback to summary
private Statement statement

SQL statement

strictDelimiterMatchingback to summary
private boolean strictDelimiterMatching

delimiters must match in case and whitespace is significant.

Since
Ant 1.8.0
totalSqlback to summary
private int totalSql
transactionsback to summary
private List<SQLExec.Transaction> transactions

SQL transactions to perform

treatWarningsAsErrorsback to summary
private boolean treatWarningsAsErrors

Whether a warning is an error - in which case onError applies.

Since
Ant 1.8.0
warningPropertyback to summary
private String warningProperty

The name of the property to set in the event of a warning

Since
Ant 1.8.0

Constructor Detail

SQLExecback to summary
public SQLExec()

Method Detail

addback to summary
public void add(ResourceCollection rc)

Adds a collection of resources (nested element).

Parameters
rc:ResourceCollection

a collection of resources containing SQL commands, each resource is run in a separate transaction.

Since
Ant 1.7
addFilesetback to summary
public void addFileset(FileSet set)

Adds a set of files (nested fileset attribute).

Parameters
set:FileSet

a set of files contains SQL commands, each File is run in a separate transaction.

addTextback to summary
public void addText(String sql)

Set an inline SQL command to execute. NB: Properties are not expanded in this text unless expandProperties is set.

Parameters
sql:String

an inline string containing the SQL command.

closeQuietlyback to summary
private void closeQuietly()
createTransactionback to summary
public SQLExec.Transaction createTransaction()

Add a SQL transaction to execute

Returns:SQLExec.Transaction

a Transaction to be configured.

execSQLback to summary
protected void execSQL(String sql, PrintStream out) throws SQLException

Exec the sql statement.

Parameters
sql:String

the SQL statement to execute

out:PrintStream

the place to put output

Exceptions
SQLException:
on SQL problems
executeback to summary
public void execute() throws BuildException

Overrides org.apache.tools.ant.Task.execute.

Load the sql file and then execute it

Annotations
@Override
Exceptions
BuildException:
on error.
getConnectionback to summary
protected Connection getConnection()

Overrides org.apache.tools.ant.taskdefs.JDBCTask.getConnection.

Caches the connection returned by the base class's getConnection method.

Subclasses that need to provide a different connection than the base class would, should override this method but keep in mind that this class expects to get the same connection instance on consecutive calls.

returns null if the connection does not connect to the expected RDBMS.

Returns:Connection

Doc from org.apache.tools.ant.taskdefs.JDBCTask.getConnection.

Connection the newly created connection or null if the connection failed and failOnConnectionError is false.

Annotations
@Override
getExpandPropertiesback to summary
public boolean getExpandProperties()

is property expansion inside inline text enabled?

Returns:boolean

true if properties are to be expanded.

Since
Ant 1.7
getStatementback to summary
protected Statement getStatement() throws SQLException

Creates and configures a Statement instance which is then cached for subsequent calls.

Subclasses that want to provide different Statement instances, should override this method but keep in mind that this class expects to get the same connection instance on consecutive calls.

Returns:Statement

Statement

Exceptions
SQLException:
if statement creation or processing fails
lastDelimiterPositionback to summary
public int lastDelimiterPosition(StringBuffer buf, String currentLine)
maybeQuoteback to summary
private String maybeQuote(String s)
printResultsback to summary
protected void printResults(PrintStream out) throws SQLException

Deprecated

since 1.6.x. Use the two arg version instead.

print any results in the statement

Parameters
out:PrintStream

the place to print results

Annotations
@Deprecated
Exceptions
SQLException:
on SQL problems.
printResultsback to summary
protected void printResults(ResultSet rs, PrintStream out) throws SQLException

print any results in the result set.

Parameters
rs:ResultSet

the resultset to print information about

out:PrintStream

the place to print results

Exceptions
SQLException:
on SQL problems.
Since
Ant 1.6.3
printValueback to summary
private void printValue(ResultSet rs, int col, PrintStream out) throws SQLException
printWarningsback to summary
private void printWarnings(SQLWarning warning, boolean force) throws SQLException
runStatementsback to summary
protected void runStatements(Reader reader, PrintStream out) throws SQLException, IOException

read in lines and execute them

Parameters
reader:Reader

the reader contains sql lines.

out:PrintStream

the place to output results.

Exceptions
SQLException:
on sql problems
IOException:
on io problems
setAppendback to summary
public void setAppend(boolean append)

whether output should be appended to or overwrite an existing file. Defaults to false.

Parameters
append:boolean

if true append to an existing file.

Since
Ant 1.5
setCsvColumnSeparatorback to summary
public void setCsvColumnSeparator(String s)

The column separator used when printing the results.

Defaults to ","

Parameters
s:String

String

Since
Ant 1.8.0
setCsvQuoteCharacterback to summary
public void setCsvQuoteCharacter(String s)

The character used to quote column values.

If set, columns that contain either the column separator or the quote character itself will be surrounded by the quote character. The quote character itself will be doubled if it appears inside of the column's value.

If this value is not set (the default), no column values will be quoted, not even if they contain the column separator.

Note

BLOB values will never be quoted.

Defaults to "not set"

Parameters
s:String

String

Since
Ant 1.8.0
setDelimiterback to summary
public void setDelimiter(String delimiter)

Set the delimiter that separates SQL statements. Defaults to ";"; optional

For example, set this to "go" and delimitertype to "ROW" for Sybase ASE or MS SQL Server.

Parameters
delimiter:String

the separator.

setDelimiterTypeback to summary
public void setDelimiterType(SQLExec.DelimiterType delimiterType)

Set the delimiter type: "normal" or "row" (default "normal").

The delimiter type takes two values - normal and row. Normal means that any occurrence of the delimiter terminate the SQL command whereas with row, only a line containing just the delimiter is recognized as the end of the command.

Parameters
delimiterType:SQLExec.DelimiterType

the type of delimiter - "normal" or "row".

setEncodingback to summary
public void setEncoding(String encoding)

Set the file encoding to use on the SQL files read in

Parameters
encoding:String

the encoding to use on the files

setErrorPropertyback to summary
public void setErrorProperty(String errorProperty)

Property to set to "true" if a statement throws an error.

Parameters
errorProperty:String

the name of the property to set in the event of an error.

Since
Ant 1.8.0
setErrorPropertyback to summary
protected final void setErrorProperty()
setEscapeProcessingback to summary
public void setEscapeProcessing(boolean enable)

Set escape processing for statements.

Parameters
enable:boolean

if true enable escape processing, default is true.

Since
Ant 1.6
setExpandPropertiesback to summary
public void setExpandProperties(boolean expandProperties)

Enable property expansion inside nested text

Parameters
expandProperties:boolean

if true expand properties.

Since
Ant 1.7
setForceCsvQuoteCharback to summary
public void setForceCsvQuoteChar(boolean forceCsvQuoteChar)

Force the csv quote character

Parameters
forceCsvQuoteChar:boolean

boolean

setKeepformatback to summary
public void setKeepformat(boolean keepformat)

whether or not format should be preserved. Defaults to false.

Parameters
keepformat:boolean

The keepformat to set

setOnerrorback to summary
public void setOnerror(SQLExec.OnError action)

Action to perform when statement fails: continue, stop, or abort optional; default "abort"

Parameters
action:SQLExec.OnError

the action to perform on statement failure.

setOutputback to summary
public void setOutput(File output)

Set the output file; optional, defaults to the Ant log.

Parameters
output:File

the output file to use for logging messages.

setOutputback to summary
public void setOutput(Resource output)

Set the output Resource; optional, defaults to the Ant log.

Parameters
output:Resource

the output Resource to store results.

Since
Ant 1.8
setOutputEncodingback to summary
public void setOutputEncoding(String outputEncoding)

The encoding to use when writing the result to a resource.

Default's to the platform's default encoding

Parameters
outputEncoding:String

the name of the encoding or null for the platform's default encoding

Since
Ant 1.9.4
setPrintback to summary
public void setPrint(boolean print)

Print result sets from the statements; optional, default false

Parameters
print:boolean

if true print result sets.

setPropertyback to summary
private void setProperty(String name, String value)
setRawBlobsback to summary
public void setRawBlobs(boolean rawBlobs)

Set whether to print raw BLOBs rather than their string (hex) representations.

Parameters
rawBlobs:boolean

whether to print raw BLOBs.

Since
Ant 1.7.1
setRowCountPropertyback to summary
public void setRowCountProperty(String rowCountProperty)

Sets a given property to the number of rows in the first statement that returned a row count.

Parameters
rowCountProperty:String

String

Since
Ant 1.8.0
setRowCountPropertyback to summary
protected final void setRowCountProperty(int rowCount)
setShowheadersback to summary
public void setShowheaders(boolean showheaders)

Print headers for result sets from the statements; optional, default true.

Parameters
showheaders:boolean

if true print headers of result sets.

setShowtrailersback to summary
public void setShowtrailers(boolean showtrailers)

Print trailing info (rows affected) for the SQL Addresses Bug/Request #27446

Parameters
showtrailers:boolean

if true prints the SQL rows affected

Since
Ant 1.7
setShowWarningsback to summary
public void setShowWarnings(boolean b)

whether to show SQLWarnings as WARN messages.

Parameters
b:boolean

boolean

Since
Ant 1.8.0
setSrcback to summary
public void setSrc(File srcFile)

Set the name of the SQL file to be run. Required unless statements are enclosed in the build file

Parameters
srcFile:File

the file containing the SQL command.

setStrictDelimiterMatchingback to summary
public void setStrictDelimiterMatching(boolean b)

If false, delimiters will be searched for in a case-insensitive manner (i.e. delimiter="go" matches "GO") and surrounding whitespace will be ignored (delimiter="go" matches "GO ").

Parameters
b:boolean

boolean

Since
Ant 1.8.0
setTreatWarningsAsErrorsback to summary
public void setTreatWarningsAsErrors(boolean b)

Whether a warning is an error - in which case onError applies.

Parameters
b:boolean

boolean

Since
Ant 1.8.0
setWarningPropertyback to summary
public void setWarningProperty(String warningProperty)

Property to set to "true" if a statement produces a warning.

Parameters
warningProperty:String

the name of the property to set in the event of a warning.

Since
Ant 1.8.0
setWarningPropertyback to summary
protected final void setWarningProperty()
org.apache.tools.ant.taskdefs back to summary

public Class SQLExec.DelimiterType

extends EnumeratedAttribute
Class Inheritance

delimiters we support, "normal" and "row"

Field Summary

Modifier and TypeField and Description
public static final String
NORMAL

The enumerated strings

public static final String
ROW

The enumerated strings

Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
value

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String[]

Returns:

the enumerated strings
getValues
()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

This is the only method a subclass needs to implement.
Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
containsValuegetIndexgetInstancegetValueindexOfValuesetValuetoString

Field Detail

NORMALback to summary
public static final String NORMAL

The enumerated strings

ROWback to summary
public static final String ROW

The enumerated strings

Constructor Detail

DelimiterTypeback to summary
public DelimiterType()

Method Detail

getValuesback to summary
public String[] getValues()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

Doc from org.apache.tools.ant.types.EnumeratedAttribute.getValues.

This is the only method a subclass needs to implement.

Returns:String[]

the enumerated strings

Annotations
@Override
org.apache.tools.ant.taskdefs back to summary

public Class SQLExec.OnError

extends EnumeratedAttribute
Class Inheritance

The action a task should perform on an error, one of "continue", "stop" and "abort"

Field Summary

Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
value

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String[]

Returns:

the enumerated values
getValues
()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

This is the only method a subclass needs to implement.
Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
containsValuegetIndexgetInstancegetValueindexOfValuesetValuetoString

Constructor Detail

OnErrorback to summary
public OnError()

Method Detail

getValuesback to summary
public String[] getValues()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

Doc from org.apache.tools.ant.types.EnumeratedAttribute.getValues.

This is the only method a subclass needs to implement.

Returns:String[]

the enumerated values

Annotations
@Override
org.apache.tools.ant.taskdefs back to summary

public Class SQLExec.Transaction

extends Object
Class Inheritance

Contains the definition of a new transaction element. Transactions allow several files or blocks of statements to be executed using the same JDBC connection and commit operation in between.

Field Summary

Modifier and TypeField and Description
private String
private Resource

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addConfigured(ResourceCollection
the source resource collection.
a
)

Set the source resource.

public void
addText(String
the inline text
sql
)

Set inline text

private void
public void
setSrc(File
the source file
src
)

Set the source file attribute.

public void
setSrcResource(Resource
the source file
src
)

Set the source resource attribute.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

tSqlCommandback to summary
private String tSqlCommand
tSrcResourceback to summary
private Resource tSrcResource

Constructor Detail

Transactionback to summary
public Transaction()

Method Detail

addConfiguredback to summary
public void addConfigured(ResourceCollection a)

Set the source resource.

Parameters
a:ResourceCollection

the source resource collection.

Since
Ant 1.7
addTextback to summary
public void addText(String sql)

Set inline text

Parameters
sql:String

the inline text

runTransactionback to summary
private void runTransaction(PrintStream out) throws IOException, SQLException
setSrcback to summary
public void setSrc(File src)

Set the source file attribute.

Parameters
src:File

the source file

setSrcResourceback to summary
public void setSrcResource(Resource src)

Set the source resource attribute.

Parameters
src:Resource

the source file

Since
Ant 1.7