com.atlassian.bamboo.upgrade.tasks
Class AbstractStatementUpgradeTask

java.lang.Object
  extended by com.atlassian.bamboo.upgrade.tasks.AbstractStatementUpgradeTask
All Implemented Interfaces:
UpgradeTask
Direct Known Subclasses:
UpgradeTask802CommitMsgFieldToClob

public abstract class AbstractStatementUpgradeTask
extends java.lang.Object
implements UpgradeTask

A base upgrade task for SQL to be run on a series of Statement


Constructor Summary
AbstractStatementUpgradeTask()
           
 
Method Summary
 void doUpgrade()
          Perform the upgrade.
 java.util.Collection<java.lang.String> getErrors()
          Return any errors that occur.
protected abstract  java.util.List<java.lang.String> getSqlStatements()
          A list of SQL statements to be run in order.
protected abstract  boolean isShouldRunUpgrade(java.sql.Statement statement)
          Whether or not the upgrade task should actually run
 void setBambooConnectionTemplate(BambooConnectionTemplate bambooConnectionTemplate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.upgrade.UpgradeTask
getBuildNumber, getShortDescription
 

Constructor Detail

AbstractStatementUpgradeTask

public AbstractStatementUpgradeTask()
Method Detail

doUpgrade

public void doUpgrade()
               throws java.lang.Exception
Description copied from interface: UpgradeTask
Perform the upgrade.

Specified by:
doUpgrade in interface UpgradeTask
Throws:
java.lang.Exception

getErrors

public java.util.Collection<java.lang.String> getErrors()
Description copied from interface: UpgradeTask
Return any errors that occur. Each entry is a string.

Specified by:
getErrors in interface UpgradeTask

isShouldRunUpgrade

protected abstract boolean isShouldRunUpgrade(@NotNull
                                              java.sql.Statement statement)
Whether or not the upgrade task should actually run

Parameters:
statement -
Returns:

getSqlStatements

protected abstract java.util.List<java.lang.String> getSqlStatements()
A list of SQL statements to be run in order. Execution will stop

Returns:

setBambooConnectionTemplate

public void setBambooConnectionTemplate(BambooConnectionTemplate bambooConnectionTemplate)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.