com.atlassian.bamboo.upgrade.tasks
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
- Direct Known Subclasses:
- UpgradeTask2210AddSystemLinkTypeToArtifactLinks, UpgradeTask2505InitAuditLogEntityType, UpgradeTask2507ConvertTrustedAppsPublicKeyToClob, UpgradeTask2508DropRevisionKeyColumnInBuild, UpgradeTask2513InitializeProcessingDuration, UpgradeTask2902SetDefaultQuarantinedTestsCount
public abstract class AbstractStatementUpgradeTask
- extends AbstractInHibernateTransactionUpgradeTask
A base upgrade task for SQL to be run on a series of Statement
Method Summary |
void |
doUpgrade(java.sql.Connection connection)
|
protected abstract java.util.List<java.lang.String> |
getSqlStatements()
A list of SQL statements to be run in order. |
protected abstract boolean |
isShouldRunUpgrade(java.sql.Statement statement)
Whether or not the upgrade task should actually run |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractStatementUpgradeTask
protected AbstractStatementUpgradeTask(@NotNull
java.lang.String buildNumber,
@NotNull
java.lang.String shortDescription)
doUpgrade
public void doUpgrade(@NotNull
java.sql.Connection connection)
throws java.sql.SQLException
- Specified by:
doUpgrade
in class AbstractInHibernateTransactionUpgradeTask
- Throws:
java.sql.SQLException
isShouldRunUpgrade
protected abstract boolean isShouldRunUpgrade(@NotNull
java.sql.Statement statement)
throws java.sql.SQLException
- Whether or not the upgrade task should actually run
- Parameters:
statement
-
- Returns:
-
- Throws:
java.sql.SQLException
getSqlStatements
@NotNull
protected abstract java.util.List<java.lang.String> getSqlStatements()
- A list of SQL statements to be run in order. Execution will stop after first failed statement
- Returns:
Copyright © 2012 Atlassian. All Rights Reserved.