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, hibernateConfig, shortDescription -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractStatementUpgradeTask(@NotNull String shortDescription) protectedAbstractStatementUpgradeTask(@NotNull String buildNumber, @NotNull String shortDescription) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoUpgrade(@NotNull Connection connection) A list of SQL statements to be run in order.protected abstract booleanisShouldRunUpgrade(@NotNull Statement statement) Whether or not the upgrade task should actually runMethods inherited from class com.atlassian.bamboo.upgrade.tasks.AbstractInHibernateTransactionUpgradeTask
doUpgrade, setBambooConnectionTemplateMethods inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeTask
getBuildNumber, getErrors, getShortDescription
-
Constructor Details
-
AbstractStatementUpgradeTask
-
AbstractStatementUpgradeTask
-
-
Method Details
-
doUpgrade
- Specified by:
doUpgradein 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:
-