Class AbstractConstraintCreationUpgradeTask
- java.lang.Object
-
- com.atlassian.confluence.upgrade.AbstractUpgradeTask
-
- com.atlassian.confluence.upgrade.upgradetask.AbstractConstraintCreationUpgradeTask
-
- All Implemented Interfaces:
BackupSupport,DatabaseUpgradeTask,UpgradeTask,UpgradeTaskInfo,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
- Direct Known Subclasses:
EmbeddedCrowdSchemaUpgradeTask
public abstract class AbstractConstraintCreationUpgradeTask extends AbstractUpgradeTask implements DatabaseUpgradeTask
An abstract upgrade task for when you just want to run a bunch of constraint creation statements from a properties file.
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Loggerlogprotected org.hibernate.SessionFactorysessionFactory
-
Constructor Summary
Constructors Constructor Description AbstractConstraintCreationUpgradeTask(org.hibernate.SessionFactory sessionFactory)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddoBeforeUpgrade(org.hibernate.Session session, org.springframework.jdbc.core.JdbcTemplate template)voiddoUpgrade()Perform the upgrade.protected abstract List<String>getSqlStatementsFromPropertiesFile()protected static List<String>getSqlStatementsFromPropertiesFile(String propertiesFile)static booleanuniqueAllowsMultipleNullValues()-
Methods inherited from class com.atlassian.confluence.upgrade.AbstractUpgradeTask
addAllErrors, addError, addError, getBuildNumber, getConstraint, getErrors, getName, getShortDescription, isDatabaseUpgrade, setBeanName, setBuildNumber, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.upgrade.BackupSupport
breaksBackwardCompatibility, runOnSpaceImport
-
Methods inherited from interface com.atlassian.confluence.upgrade.UpgradeTask
getConstraint, getErrors, validate
-
Methods inherited from interface com.atlassian.confluence.upgrade.UpgradeTaskInfo
getBuildNumber, getName, getShortDescription, isDatabaseUpgrade
-
-
-
-
Method Detail
-
getSqlStatementsFromPropertiesFile
protected abstract List<String> getSqlStatementsFromPropertiesFile()
-
getSqlStatementsFromPropertiesFile
protected static List<String> getSqlStatementsFromPropertiesFile(String propertiesFile)
-
doBeforeUpgrade
protected abstract void doBeforeUpgrade(org.hibernate.Session session, org.springframework.jdbc.core.JdbcTemplate template)
-
doUpgrade
public final void doUpgrade() throws ExceptionDescription copied from interface:UpgradeTaskPerform the upgrade.- Specified by:
doUpgradein interfaceUpgradeTask- Throws:
Exception- See Also:
doUpgrade(JdbcTemplate)
-
uniqueAllowsMultipleNullValues
public static boolean uniqueAllowsMultipleNullValues()
- Returns:
- True if the current database allows multiple null values to be inserted in a column on which there is a unique constraint.
-
-