org.archiviststoolkit.maintenance.upgrades
Class Upgrade
java.lang.Object
org.archiviststoolkit.maintenance.upgrades.Upgrade
- Direct Known Subclasses:
- UpgradeTo_1_0_01, UpgradeTo_1_0_03, UpgradeTo_1_0_04, UpgradeTo_1_0_05, UpgradeTo_1_0_08, UpgradeTo_1_0_09, UpgradeTo_1_0_10, UpgradeTo_1_0_11, UpgradeTo_1_0_12, UpgradeTo_1_0_15, UpgradeTo_1_0_16, UpgradeTo_1_0_20, UpgradeTo_1_0_21, UpgradeTo_1_0_22, UpgradeTo_1_0_24, UpgradeTo_1_0_28, UpgradeTo_1_0_29, UpgradeTo_1_0_30, UpgradeTo_1_0_36, UpgradeTo_1_0_40, UpgradeTo_1_1_09, UpgradeTo_1_1_10, UpgradeTo_1_1_11, UpgradeTo_1_1_20, UpgradeTo_1_1_21, UpgradeTo_1_1_24, UpgradeTo_1_5_2, UpgradeTo_1_6_0, UpgradeTo_1_7_0
public abstract class Upgrade
- extends java.lang.Object
Method Summary |
protected abstract boolean |
doUpgrade(java.sql.Connection conn,
int initialStep,
int numberOfSteps,
org.netbeans.spi.wizard.DeferredWizardResult.ResultProgressHandle progress)
|
protected void |
fixListValues(java.sql.Connection conn,
java.lang.String listName,
java.lang.String oldListItem,
java.lang.String newListItem)
|
java.lang.String |
getErrorString()
|
protected abstract int |
getNumberOfSteps()
|
protected java.lang.String |
getWarningMessage()
|
protected boolean |
runDetermineSequenceNumbers()
|
protected boolean |
runFieldInit()
|
protected boolean |
runLoadLookupLists()
|
protected boolean |
runPostDBInitializationCode()
|
protected boolean |
runPostDBInitializationSQLCode(java.sql.Connection conn)
Method to run SQL code that needs to be executed after hibernate has been initialized
should circumvent some of the chicken and the egg problem where a table that hibernate creates needs
to be updated by SQL code cause it is just easier |
protected void |
setErrorString(java.lang.String errorString)
|
protected void |
updateFieldValue(java.sql.Connection conn,
java.lang.String tableName,
java.lang.String fieldName,
java.lang.String oldValue,
java.lang.String newValue)
|
protected abstract boolean |
upgradeNeeded(java.sql.Connection conn)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
errorString
protected java.lang.String errorString
Upgrade
public Upgrade()
getErrorString
public java.lang.String getErrorString()
setErrorString
protected void setErrorString(java.lang.String errorString)
doUpgrade
protected abstract boolean doUpgrade(java.sql.Connection conn,
int initialStep,
int numberOfSteps,
org.netbeans.spi.wizard.DeferredWizardResult.ResultProgressHandle progress)
getNumberOfSteps
protected abstract int getNumberOfSteps()
upgradeNeeded
protected abstract boolean upgradeNeeded(java.sql.Connection conn)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getWarningMessage
protected java.lang.String getWarningMessage()
runFieldInit
protected boolean runFieldInit()
runLoadLookupLists
protected boolean runLoadLookupLists()
runDetermineSequenceNumbers
protected boolean runDetermineSequenceNumbers()
runPostDBInitializationCode
protected boolean runPostDBInitializationCode()
runPostDBInitializationSQLCode
protected boolean runPostDBInitializationSQLCode(java.sql.Connection conn)
- Method to run SQL code that needs to be executed after hibernate has been initialized
should circumvent some of the chicken and the egg problem where a table that hibernate creates needs
to be updated by SQL code cause it is just easier
- Parameters:
conn
- The connection to the database
- Returns:
- Whether the sql commands executed without error
fixListValues
protected void fixListValues(java.sql.Connection conn,
java.lang.String listName,
java.lang.String oldListItem,
java.lang.String newListItem)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
updateFieldValue
protected void updateFieldValue(java.sql.Connection conn,
java.lang.String tableName,
java.lang.String fieldName,
java.lang.String oldValue,
java.lang.String newValue)
throws java.sql.SQLException
- Throws:
java.sql.SQLException