net.sourceforge.addam.ddlrun
Class UpgradeTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.JDBCTask
              extended by net.sourceforge.addam.ddlrun.UpgradeTask
All Implemented Interfaces:
RunLogger

public class UpgradeTask
extends org.apache.tools.ant.taskdefs.JDBCTask
implements RunLogger

Implementation of the ant deployment task. This is NOT generic - it assumes specific database structure for tracking the scripts already run.


Field Summary
private  String dbversion
           
private  File script
           
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
UpgradeTask()
           
 
Method Summary
 void execute()
           
 void logRunComplete(String group, long time)
           
 void logRunFailure(String group, String script, Exception e)
           
 void logRunScript(String script, long time)
           
 void setScript(File script)
           
 void setVersion(String version)
           
 
Methods inherited from class org.apache.tools.ant.taskdefs.JDBCTask
createClasspath, getClasspath, getConnection, getLoader, getLoaderMap, getPassword, getRdbms, getUrl, getUserId, getVersion, isAutocommit, isCaching, isValidRdbms, setAutocommit, setCaching, setClasspath, setClasspathRef, setDriver, setPassword, setRdbms, setUrl, setUserid
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

script

private File script

dbversion

private String dbversion
Constructor Detail

UpgradeTask

public UpgradeTask()
Method Detail

setScript

public void setScript(File script)

setVersion

public void setVersion(String version)
Overrides:
setVersion in class org.apache.tools.ant.taskdefs.JDBCTask

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException

logRunScript

public void logRunScript(String script,
                         long time)
                  throws Exception
Specified by:
logRunScript in interface RunLogger
Throws:
Exception

logRunComplete

public void logRunComplete(String group,
                           long time)
                    throws Exception
Specified by:
logRunComplete in interface RunLogger
Throws:
Exception

logRunFailure

public void logRunFailure(String group,
                          String script,
                          Exception e)
                   throws Exception
Specified by:
logRunFailure in interface RunLogger
Throws:
Exception


Copyright © 2005-2006 ADDAM Project Team. All Rights Reserved.