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 of
Statement
-
Field Summary
Fields inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeTask
errors
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractStatementUpgradeTask
(@NotNull String shortDescription) protected
AbstractStatementUpgradeTask
(@NotNull String buildNumber, @NotNull String shortDescription) -
Method Summary
Modifier and TypeMethodDescriptionvoid
doUpgrade
(@NotNull Connection connection) 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 runMethods inherited from class com.atlassian.bamboo.upgrade.tasks.AbstractInHibernateTransactionUpgradeTask
doUpgrade, setBambooConnectionTemplate
Methods inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeTask
getBuildNumber, getErrors, getShortDescription
-
Constructor Details
-
AbstractStatementUpgradeTask
-
AbstractStatementUpgradeTask
-
-
Method Details
-
doUpgrade
- 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
-
getSqlStatements
A list of SQL statements to be run in order. Execution will stop after first failed statement- Returns:
-