Class AbstractStatementUpgradeTask
- java.lang.Object
-
- com.atlassian.bamboo.upgrade.AbstractUpgradeTask
-
- com.atlassian.bamboo.upgrade.tasks.AbstractInHibernateTransactionUpgradeTask
-
- com.atlassian.bamboo.upgrade.tasks.AbstractStatementUpgradeTask
-
- All Implemented Interfaces:
UpgradeTask
public abstract class AbstractStatementUpgradeTask extends AbstractInHibernateTransactionUpgradeTask
A base upgrade task for SQL to be run on a series ofStatement
-
-
Field Summary
-
Fields inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeTask
errors
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractStatementUpgradeTask(@NotNull String shortDescription)
protected
AbstractStatementUpgradeTask(@NotNull String buildNumber, @NotNull String shortDescription)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
doUpgrade(@NotNull Connection connection)
protected abstract @NotNull List<String>
getSqlStatements()
A list of SQL statements to be run in order.protected abstract boolean
isShouldRunUpgrade(@NotNull Statement statement)
Whether or not the upgrade task should actually run-
Methods inherited from class com.atlassian.bamboo.upgrade.tasks.AbstractInHibernateTransactionUpgradeTask
doUpgrade, setBambooConnectionTemplate
-
Methods inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeTask
getBuildNumber, getErrors, getShortDescription
-
-
-
-
Method Detail
-
doUpgrade
public void doUpgrade(@NotNull @NotNull Connection connection) throws SQLException
- Specified by:
doUpgrade
in classAbstractInHibernateTransactionUpgradeTask
- Throws:
SQLException
-
isShouldRunUpgrade
protected abstract boolean isShouldRunUpgrade(@NotNull @NotNull Statement statement) throws SQLException
Whether or not the upgrade task should actually run- Parameters:
statement
-- Returns:
- Throws:
SQLException
-
-