@PublicAPI public class Updater extends java.lang.Object
String message = ""; ProgressWriter pw = ...; Updater ud = new Updater(conh); Updater.UpdateInfo ui = null; while ((ui = ud.getNextUpdateInfo()) != null) { if (displayMessage(ui)) { System.out.println("\n" + ui.processingMessage + "\n"); if (ui.isProgressMonitoringSupported) { message = ud.performCurrentUpdate(pw); } else { message = ud.performCurrentUpdate(); } System.out.println(message); } else if (ui.isOperationRequired) { // stopping, since further updates may depend on this one break; } }
Modifier and Type | Class and Description |
---|---|
class |
Updater.UpdateInfo
Class describing the nature of an update.
|
Constructor and Description |
---|
Updater(ConnectionHandler conh)
Constructor.
|
Updater(ConnectionHandler conh,
java.util.List<java.lang.String> tablesToConsider)
Similar to
Updater(ConnectionHandler) , but adds the ability for
the user to specify a list of tables to which to restrict the operation
of this Updater . |
Modifier and Type | Method and Description |
---|---|
Updater.UpdateInfo |
getNextUpdateInfo()
Returns the update information for the next update step.
|
Updater.UpdateInfo |
getNextUpdateInfo(ProgressWriter pw)
Returns the update information for the next update step.
|
boolean |
isUpdateNeededForTable(java.lang.String tableName)
Check whether structural upgrade is necessary for a particular table.
|
static void |
modifyExtColumnInOraclePropertyTable(ConnectionHandler connectionHandler) |
java.lang.String |
performCurrentUpdate()
Performs the current update operation.
|
java.lang.String |
performCurrentUpdate(ProgressWriter pw)
Performs the current update operation with progress monitoring where supported.
|
public Updater(ConnectionHandler conh)
conh
- ConnectionHandler with live connectionpublic Updater(ConnectionHandler conh, java.util.List<java.lang.String> tablesToConsider)
Updater(ConnectionHandler)
, but adds the ability for
the user to specify a list of tables to which to restrict the operation
of this Updater
.conh
- ConnectionHandler with live connectiontablesToConsider
- include only these tables in the update.public Updater.UpdateInfo getNextUpdateInfo() throws java.sql.SQLException
null
, if there are no more updates
leftjava.sql.SQLException
- if an error occursperformCurrentUpdate()
public Updater.UpdateInfo getNextUpdateInfo(ProgressWriter pw) throws java.sql.SQLException
pw
- the progress writernull
, if there are no more updates
leftjava.sql.SQLException
- if an error occursperformCurrentUpdate()
public boolean isUpdateNeededForTable(java.lang.String tableName) throws java.sql.SQLException
tableName
- Name of the structure table.java.sql.SQLException
- if an error occurspublic java.lang.String performCurrentUpdate() throws java.sql.SQLException
java.sql.SQLException
- if an error occursgetNextUpdateInfo()
public java.lang.String performCurrentUpdate(ProgressWriter pw) throws java.sql.SQLException
pw
- the progress writerjava.sql.SQLException
- if an error occursgetNextUpdateInfo()
public static void modifyExtColumnInOraclePropertyTable(ConnectionHandler connectionHandler) throws java.sql.SQLException
java.sql.SQLException