Class AbstractPreparedStatementUpgradeTask
- java.lang.Object
-
- com.atlassian.bamboo.upgrade.AbstractUpgradeTask
-
- com.atlassian.bamboo.upgrade.tasks.AbstractInHibernateTransactionUpgradeTask
-
- com.atlassian.bamboo.upgrade.tasks.AbstractPreparedStatementUpgradeTask
-
- All Implemented Interfaces:
UpgradeTask
- Direct Known Subclasses:
UpgradeTask80105SetGlobalToFalseForProjectRepositories,UpgradeTask90401DeleteOrphanedTestClasses,UpgradeTask90403AddDefaultPrerequisite
public abstract class AbstractPreparedStatementUpgradeTask extends AbstractInHibernateTransactionUpgradeTask
A base upgrade task for simple singlePreparedStatementupgrades
-
-
Field Summary
-
Fields inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeTask
errors
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPreparedStatementUpgradeTask(@NotNull String shortDescription)protectedAbstractPreparedStatementUpgradeTask(@NotNull String buildNumber, @NotNull String shortDescription)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddoUpgrade(@NotNull Connection connection)protected abstract StringgetPreparedStatementSql()Returns the SQL that will be used to init aPreparedStatementprotected booleanisShouldRunUpgrade(@NotNull Statement statement)Whether or not the upgrade task should actually runprotected abstract voidprepareStatement(PreparedStatement statement)Sets the various values in aPreparedStatement-
Methods inherited from class com.atlassian.bamboo.upgrade.tasks.AbstractInHibernateTransactionUpgradeTask
doUpgrade, setBambooConnectionTemplate
-
Methods inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeTask
getBuildNumber, getErrors, getShortDescription
-
-
-
-
Constructor Detail
-
AbstractPreparedStatementUpgradeTask
protected AbstractPreparedStatementUpgradeTask(@NotNull @NotNull String buildNumber, @NotNull @NotNull String shortDescription)
-
AbstractPreparedStatementUpgradeTask
protected AbstractPreparedStatementUpgradeTask(@NotNull @NotNull String shortDescription)
-
-
Method Detail
-
doUpgrade
public void doUpgrade(@NotNull @NotNull Connection connection) throws SQLException- Specified by:
doUpgradein classAbstractInHibernateTransactionUpgradeTask- Throws:
SQLException
-
getPreparedStatementSql
protected abstract String getPreparedStatementSql()
Returns the SQL that will be used to init aPreparedStatement- Returns:
-
prepareStatement
protected abstract void prepareStatement(PreparedStatement statement) throws SQLException
Sets the various values in aPreparedStatement- Parameters:
statement-- Throws:
SQLException
-
isShouldRunUpgrade
protected boolean isShouldRunUpgrade(@NotNull @NotNull Statement statement)Whether or not the upgrade task should actually run- Parameters:
statement-- Returns:
-
-