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 singlePreparedStatement
upgrades
-
-
Field Summary
-
Fields inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeTask
errors
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractPreparedStatementUpgradeTask(@NotNull String shortDescription)
protected
AbstractPreparedStatementUpgradeTask(@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 String
getPreparedStatementSql()
Returns the SQL that will be used to init aPreparedStatement
protected boolean
isShouldRunUpgrade(@NotNull Statement statement)
Whether or not the upgrade task should actually runprotected abstract void
prepareStatement(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:
doUpgrade
in 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:
-
-