Edit C:\apache-ant-1.8.0\docs\manual\api\org\apache\tools\ant\taskdefs\JDBCTask.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_22) on Mon Feb 01 19:35:37 EST 2010 --> <TITLE> JDBCTask (Apache Ant API) </TITLE> <META NAME="keywords" CONTENT="org.apache.tools.ant.taskdefs.JDBCTask class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="JDBCTask (Apache Ant API)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/tools/ant/taskdefs/Javadoc.TagArgument.html" title="class in org.apache.tools.ant.taskdefs"><B>PREV CLASS</B></A> <A HREF="../../../../../org/apache/tools/ant/taskdefs/Jikes.html" title="class in org.apache.tools.ant.taskdefs"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/tools/ant/taskdefs/JDBCTask.html" target="_top"><B>FRAMES</B></A> <A HREF="JDBCTask.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_org.apache.tools.ant.Task">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> org.apache.tools.ant.taskdefs</FONT> <BR> Class JDBCTask</H2> <PRE> java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">org.apache.tools.ant.ProjectComponent</A> <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">org.apache.tools.ant.Task</A> <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.tools.ant.taskdefs.JDBCTask</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable</DD> </DL> <DL> <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html" title="class in org.apache.tools.ant.taskdefs">SQLExec</A></DD> </DL> <HR> <DL> <DT><PRE>public abstract class <B>JDBCTask</B><DT>extends <A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></DL> </PRE> <P> Handles JDBC configuration needed by SQL type tasks. <p> The following example class prints the contents of the first column of each row in TableName. </p> <code><pre> package examples; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.taskdefs.JDBCTask; public class SQLExampleTask extends JDBCTask { private String tableName; public void execute() throws BuildException { Connection conn = getConnection(); Statement stmt=null; try { if (tableName == null) { throw new BuildException("TableName must be specified",location); } String sql = "SELECT * FROM "+tableName; stmt= conn.createStatement(); ResultSet rs = stmt.executeQuery(sql); while (rs.next()) { log(rs.getObject(1).toString()); } } catch (SQLException e) { } finally { if (stmt != null) { try {stmt.close();}catch (SQLException ingore) {} } if (conn != null) { try {conn.close();}catch (SQLException ingore) {} } } } public void setTableName(String tableName) { this.tableName = tableName; } } </pre></code> <P> <P> <DL> <DT><B>Since:</B></DT> <DD>Ant 1.5</DD> </DL> <HR> <P> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> </TABLE> <A NAME="fields_inherited_from_class_org.apache.tools.ant.Task"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from class org.apache.tools.ant.<A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../org/apache/tools/ant/Task.html#target">target</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#taskName">taskName</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#taskType">taskType</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#wrapper">wrapper</A></CODE></TD> </TR> </TABLE> <A NAME="fields_inherited_from_class_org.apache.tools.ant.ProjectComponent"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from class org.apache.tools.ant.<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#description">description</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#location">location</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#project">project</A></CODE></TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#JDBCTask()">JDBCTask</A></B>()</CODE> <BR> </TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#addConnectionProperty(org.apache.tools.ant.taskdefs.Property)">addConnectionProperty</A></B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/Property.html" title="class in org.apache.tools.ant.taskdefs">Property</A> var)</CODE> <BR> Additional properties to put into the JDBC connection string.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#createClasspath()">createClasspath</A></B>()</CODE> <BR> Add a path to the classpath for loading the driver.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getClasspath()">getClasspath</A></B>()</CODE> <BR> Gets the classpath.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected java.sql.Connection</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getConnection()">getConnection</A></B>()</CODE> <BR> Creates a new Connection as using the driver, url, userid and password specified.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="../../../../../org/apache/tools/ant/AntClassLoader.html" title="class in org.apache.tools.ant">AntClassLoader</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getLoader()">getLoader</A></B>()</CODE> <BR> Get the classloader used to create a driver.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected static java.util.Hashtable</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getLoaderMap()">getLoaderMap</A></B>()</CODE> <BR> Get the cache of loaders and drivers.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getPassword()">getPassword</A></B>()</CODE> <BR> Gets the password.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getRdbms()">getRdbms</A></B>()</CODE> <BR> Gets the rdbms.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getUrl()">getUrl</A></B>()</CODE> <BR> Gets the url.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getUserId()">getUserId</A></B>()</CODE> <BR> Gets the userId.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getVersion()">getVersion</A></B>()</CODE> <BR> Gets the version.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#isAutocommit()">isAutocommit</A></B>()</CODE> <BR> Gets the autocommit.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#isCaching(boolean)">isCaching</A></B>(boolean value)</CODE> <BR> Set the caching attribute.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#isValidRdbms(java.sql.Connection)">isValidRdbms</A></B>(java.sql.Connection conn)</CODE> <BR> Verify we are connected to the correct RDBMS</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setAutocommit(boolean)">setAutocommit</A></B>(boolean autocommit)</CODE> <BR> Auto commit flag for database connection; optional, default false.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setCaching(boolean)">setCaching</A></B>(boolean enable)</CODE> <BR> Caching loaders / driver.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setClasspath(org.apache.tools.ant.types.Path)">setClasspath</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> classpath)</CODE> <BR> Sets the classpath for loading the driver.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setClasspathRef(org.apache.tools.ant.types.Reference)">setClasspathRef</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</A> r)</CODE> <BR> Set the classpath for loading the driver using the classpath reference.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setDriver(java.lang.String)">setDriver</A></B>(java.lang.String driver)</CODE> <BR> Class name of the JDBC driver; required.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setFailOnConnectionError(boolean)">setFailOnConnectionError</A></B>(boolean b)</CODE> <BR> whether the task should cause the build to fail if it cannot connect to the database.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setPassword(java.lang.String)">setPassword</A></B>(java.lang.String password)</CODE> <BR> Sets the password; required.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setRdbms(java.lang.String)">setRdbms</A></B>(java.lang.String rdbms)</CODE> <BR> Execute task only if the lower case product name of the DB matches this</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setUrl(java.lang.String)">setUrl</A></B>(java.lang.String url)</CODE> <BR> Sets the database connection URL; required.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setUserid(java.lang.String)">setUserid</A></B>(java.lang.String userId)</CODE> <BR> Set the user name for the connection; required.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setVersion(java.lang.String)">setVersion</A></B>(java.lang.String version)</CODE> <BR> Sets the version string, execute task only if rdbms version match; optional.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_org.apache.tools.ant.Task"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class org.apache.tools.ant.<A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../org/apache/tools/ant/Task.html#bindToOwner(org.apache.tools.ant.Task)">bindToOwner</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#execute()">execute</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getOwningTarget()">getOwningTarget</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getRuntimeConfigurableWrapper()">getRuntimeConfigurableWrapper</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getTaskName()">getTaskName</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getTaskType()">getTaskType</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getWrapper()">getWrapper</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleErrorFlush(java.lang.String)">handleErrorFlush</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleErrorOutput(java.lang.String)">handleErrorOutput</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleFlush(java.lang.String)">handleFlush</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleInput(byte[], int, int)">handleInput</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleOutput(java.lang.String)">handleOutput</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#init()">init</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#isInvalid()">isInvalid</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#log(java.lang.String)">log</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#log(java.lang.String, int)">log</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#log(java.lang.String, java.lang.Throwable, int)">log</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#log(java.lang.Throwable, int)">log</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#maybeConfigure()">maybeConfigure</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#perform()">perform</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#reconfigure()">reconfigure</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setOwningTarget(org.apache.tools.ant.Target)">setOwningTarget</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setRuntimeConfigurableWrapper(org.apache.tools.ant.RuntimeConfigurable)">setRuntimeConfigurableWrapper</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setTaskName(java.lang.String)">setTaskName</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setTaskType(java.lang.String)">setTaskType</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_org.apache.tools.ant.ProjectComponent"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class org.apache.tools.ant.<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#clone()">clone</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#getDescription()">getDescription</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#getLocation()">getLocation</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#getProject()">getProject</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#setDescription(java.lang.String)">setDescription</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#setLocation(org.apache.tools.ant.Location)">setLocation</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#setProject(org.apache.tools.ant.Project)">setProject</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="JDBCTask()"><!-- --></A><H3> JDBCTask</H3> <PRE> public <B>JDBCTask</B>()</PRE> <DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="setClasspath(org.apache.tools.ant.types.Path)"><!-- --></A><H3> setClasspath</H3> <PRE> public void <B>setClasspath</B>(<A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> classpath)</PRE> <DL> <DD>Sets the classpath for loading the driver. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>classpath</CODE> - The classpath to set</DL> </DD> </DL> <HR> <A NAME="setCaching(boolean)"><!-- --></A><H3> setCaching</H3> <PRE> public void <B>setCaching</B>(boolean enable)</PRE> <DL> <DD>Caching loaders / driver. This is to avoid getting an OutOfMemoryError when calling this task multiple times in a row; default: true <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>enable</CODE> - a <code>boolean</code> value</DL> </DD> </DL> <HR> <A NAME="createClasspath()"><!-- --></A><H3> createClasspath</H3> <PRE> public <A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> <B>createClasspath</B>()</PRE> <DL> <DD>Add a path to the classpath for loading the driver. <P> <DD><DL> <DT><B>Returns:</B><DD>a path to be configured</DL> </DD> </DL> <HR> <A NAME="setClasspathRef(org.apache.tools.ant.types.Reference)"><!-- --></A><H3> setClasspathRef</H3> <PRE> public void <B>setClasspathRef</B>(<A HREF="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</A> r)</PRE> <DL> <DD>Set the classpath for loading the driver using the classpath reference. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>r</CODE> - a reference to a classpath</DL> </DD> </DL> <HR> <A NAME="setDriver(java.lang.String)"><!-- --></A><H3> setDriver</H3> <PRE> public void <B>setDriver</B>(java.lang.String driver)</PRE> <DL> <DD>Class name of the JDBC driver; required. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>driver</CODE> - The driver to set</DL> </DD> </DL> <HR> <A NAME="setUrl(java.lang.String)"><!-- --></A><H3> setUrl</H3> <PRE> public void <B>setUrl</B>(java.lang.String url)</PRE> <DL> <DD>Sets the database connection URL; required. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>url</CODE> - The url to set</DL> </DD> </DL> <HR> <A NAME="setPassword(java.lang.String)"><!-- --></A><H3> setPassword</H3> <PRE> public void <B>setPassword</B>(java.lang.String password)</PRE> <DL> <DD>Sets the password; required. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>password</CODE> - The password to set</DL> </DD> </DL> <HR> <A NAME="setAutocommit(boolean)"><!-- --></A><H3> setAutocommit</H3> <PRE> public void <B>setAutocommit</B>(boolean autocommit)</PRE> <DL> <DD>Auto commit flag for database connection; optional, default false. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>autocommit</CODE> - The autocommit to set</DL> </DD> </DL> <HR> <A NAME="setRdbms(java.lang.String)"><!-- --></A><H3> setRdbms</H3> <PRE> public void <B>setRdbms</B>(java.lang.String rdbms)</PRE> <DL> <DD>Execute task only if the lower case product name of the DB matches this <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>rdbms</CODE> - The rdbms to set</DL> </DD> </DL> <HR> <A NAME="setVersion(java.lang.String)"><!-- --></A><H3> setVersion</H3> <PRE> public void <B>setVersion</B>(java.lang.String version)</PRE> <DL> <DD>Sets the version string, execute task only if rdbms version match; optional. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>version</CODE> - The version to set</DL> </DD> </DL> <HR> <A NAME="setFailOnConnectionError(boolean)"><!-- --></A><H3> setFailOnConnectionError</H3> <PRE> public void <B>setFailOnConnectionError</B>(boolean b)</PRE> <DL> <DD>whether the task should cause the build to fail if it cannot connect to the database. <P> <DD><DL> <DT><B>Since:</B></DT> <DD>Ant 1.8.0</DD> </DL> </DD> </DL> <HR> <A NAME="isValidRdbms(java.sql.Connection)"><!-- --></A><H3> isValidRdbms</H3> <PRE> protected boolean <B>isValidRdbms</B>(java.sql.Connection conn)</PRE> <DL> <DD>Verify we are connected to the correct RDBMS <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>conn</CODE> - the jdbc connection <DT><B>Returns:</B><DD>true if we are connected to the correct RDBMS</DL> </DD> </DL> <HR> <A NAME="getLoaderMap()"><!-- --></A><H3> getLoaderMap</H3> <PRE> protected static java.util.Hashtable <B>getLoaderMap</B>()</PRE> <DL> <DD>Get the cache of loaders and drivers. <P> <DD><DL> <DT><B>Returns:</B><DD>a hashtable</DL> </DD> </DL> <HR> <A NAME="getLoader()"><!-- --></A><H3> getLoader</H3> <PRE> protected <A HREF="../../../../../org/apache/tools/ant/AntClassLoader.html" title="class in org.apache.tools.ant">AntClassLoader</A> <B>getLoader</B>()</PRE> <DL> <DD>Get the classloader used to create a driver. <P> <DD><DL> <DT><B>Returns:</B><DD>the classloader</DL> </DD> </DL> <HR> <A NAME="addConnectionProperty(org.apache.tools.ant.taskdefs.Property)"><!-- --></A><H3> addConnectionProperty</H3> <PRE> public void <B>addConnectionProperty</B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/Property.html" title="class in org.apache.tools.ant.taskdefs">Property</A> var)</PRE> <DL> <DD>Additional properties to put into the JDBC connection string. <P> <DD><DL> <DT><B>Since:</B></DT> <DD>Ant 1.8.0</DD> </DL> </DD> </DL> <HR> <A NAME="getConnection()"><!-- --></A><H3> getConnection</H3> <PRE> protected java.sql.Connection <B>getConnection</B>() throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE> <DL> <DD>Creates a new Connection as using the driver, url, userid and password specified. The calling method is responsible for closing the connection. <P> <DD><DL> <DT><B>Returns:</B><DD>Connection the newly created connection or null if the connection failed and failOnConnectionError is false. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - if the UserId/Password/Url is not set or there is no suitable driver or the driver fails to load.</DL> </DD> </DL> <HR> <A NAME="isCaching(boolean)"><!-- --></A><H3> isCaching</H3> <PRE> public void <B>isCaching</B>(boolean value)</PRE> <DL> <DD>Set the caching attribute. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - a <code>boolean</code> value</DL> </DD> </DL> <HR> <A NAME="getClasspath()"><!-- --></A><H3> getClasspath</H3> <PRE> public <A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> <B>getClasspath</B>()</PRE> <DL> <DD>Gets the classpath. <P> <DD><DL> <DT><B>Returns:</B><DD>Returns a Path</DL> </DD> </DL> <HR> <A NAME="isAutocommit()"><!-- --></A><H3> isAutocommit</H3> <PRE> public boolean <B>isAutocommit</B>()</PRE> <DL> <DD>Gets the autocommit. <P> <DD><DL> <DT><B>Returns:</B><DD>Returns a boolean</DL> </DD> </DL> <HR> <A NAME="getUrl()"><!-- --></A><H3> getUrl</H3> <PRE> public java.lang.String <B>getUrl</B>()</PRE> <DL> <DD>Gets the url. <P> <DD><DL> <DT><B>Returns:</B><DD>Returns a String</DL> </DD> </DL> <HR> <A NAME="getUserId()"><!-- --></A><H3> getUserId</H3> <PRE> public java.lang.String <B>getUserId</B>()</PRE> <DL> <DD>Gets the userId. <P> <DD><DL> <DT><B>Returns:</B><DD>Returns a String</DL> </DD> </DL> <HR> <A NAME="setUserid(java.lang.String)"><!-- --></A><H3> setUserid</H3> <PRE> public void <B>setUserid</B>(java.lang.String userId)</PRE> <DL> <DD>Set the user name for the connection; required. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>userId</CODE> - The userId to set</DL> </DD> </DL> <HR> <A NAME="getPassword()"><!-- --></A><H3> getPassword</H3> <PRE> public java.lang.String <B>getPassword</B>()</PRE> <DL> <DD>Gets the password. <P> <DD><DL> <DT><B>Returns:</B><DD>Returns a String</DL> </DD> </DL> <HR> <A NAME="getRdbms()"><!-- --></A><H3> getRdbms</H3> <PRE> public java.lang.String <B>getRdbms</B>()</PRE> <DL> <DD>Gets the rdbms. <P> <DD><DL> <DT><B>Returns:</B><DD>Returns a String</DL> </DD> </DL> <HR> <A NAME="getVersion()"><!-- --></A><H3> getVersion</H3> <PRE> public java.lang.String <B>getVersion</B>()</PRE> <DL> <DD>Gets the version. <P> <DD><DL> <DT><B>Returns:</B><DD>Returns a String</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/tools/ant/taskdefs/Javadoc.TagArgument.html" title="class in org.apache.tools.ant.taskdefs"><B>PREV CLASS</B></A> <A HREF="../../../../../org/apache/tools/ant/taskdefs/Jikes.html" title="class in org.apache.tools.ant.taskdefs"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/tools/ant/taskdefs/JDBCTask.html" target="_top"><B>FRAMES</B></A> <A HREF="JDBCTask.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_org.apache.tools.ant.Task">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de