com.atlassian.bamboo.upgrade.tasks
Class AbstractPreparedStatementUpgradeTask

java.lang.Object
  extended by com.atlassian.bamboo.upgrade.AbstractUpgradeTask
      extended by com.atlassian.bamboo.upgrade.tasks.AbstractInHibernateTransactionUpgradeTask
          extended by com.atlassian.bamboo.upgrade.tasks.AbstractPreparedStatementUpgradeTask
All Implemented Interfaces:
UpgradeTask
Direct Known Subclasses:
UpgradeTask1307SetDefaultElasticImageConfiguration, UpgradeTask1309DefaultEnabledForElasticSchedule, UpgradeTask2404SetUniqueIdForAllRequirements, UpgradeTask2411DeleteAllScriptCapabilities, UpgradeTask2412DeleteAllNAntScriptCapabilities

public abstract class AbstractPreparedStatementUpgradeTask
extends AbstractInHibernateTransactionUpgradeTask

A base upgrade task for simple single PreparedStatement upgrades


Field Summary
 
Fields inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeTask
errors
 
Constructor Summary
protected AbstractPreparedStatementUpgradeTask(java.lang.String buildNumber, java.lang.String shortDescription)
           
 
Method Summary
 void doUpgrade(java.sql.Connection connection)
           
protected abstract  java.lang.String getPreparedStatementSql()
          Returns the SQL that will be used to init a PreparedStatement
protected abstract  boolean isShouldRunUpgrade(java.sql.Statement statement)
          Whether or not the upgrade task should actually run
protected abstract  void prepareStatement(java.sql.PreparedStatement statement)
          Sets the various values in a PreparedStatement
 
Methods inherited from class com.atlassian.bamboo.upgrade.tasks.AbstractInHibernateTransactionUpgradeTask
doUpgrade, setBambooConnectionTemplate
 
Methods inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeTask
getBuildNumber, getErrors, getShortDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPreparedStatementUpgradeTask

protected AbstractPreparedStatementUpgradeTask(@NotNull
                                               java.lang.String buildNumber,
                                               @NotNull
                                               java.lang.String shortDescription)
Method Detail

doUpgrade

public void doUpgrade(@NotNull
                      java.sql.Connection connection)
               throws java.sql.SQLException
Specified by:
doUpgrade in class AbstractInHibernateTransactionUpgradeTask
Throws:
java.sql.SQLException

getPreparedStatementSql

protected abstract java.lang.String getPreparedStatementSql()
Returns the SQL that will be used to init a PreparedStatement

Returns:

prepareStatement

protected abstract void prepareStatement(java.sql.PreparedStatement statement)
                                  throws java.sql.SQLException
Sets the various values in a PreparedStatement

Parameters:
statement -
Throws:
java.sql.SQLException

isShouldRunUpgrade

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

Parameters:
statement -
Returns:


Copyright © 2011 Atlassian. All Rights Reserved.