|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lyra.Patch
public class Patch
Patch is a class that checks to ensure that the Host and Configuration databases are up to the version of Lyra that is making use of it. This will effectively permit users to keep their settings and options.
Implementation is rather primitive. It will check for version information and then create the changes accordingly. Since the versions are checked sequentially, a client at 1.0.0 will have no problem being upgraded to 1.0.5 without consequence.
Field Summary | |
---|---|
private static java.lang.String |
CLASS
|
private Interface |
Db
|
private Ledger |
Logger
|
private java.lang.String |
Version
|
Constructor Summary | |
---|---|
private |
Patch(Ledger logger,
Interface db,
java.lang.String version)
Main constructor for class. |
Method Summary | |
---|---|
private boolean |
compareVersion(java.lang.String current,
java.lang.String target)
Lyra makes use of the same designation for all of its versions and that means the Version.Major.Minor numbering scheme. |
private void |
confirmHost()
Looks at the version information and will perform the necessary database updates in order to ensure they go through. |
private void |
confirmMain()
Looks at the version information and will perform the necessary database updates in order to ensure they go through. |
static void |
hostPatch(Ledger logger,
Interface db,
java.lang.String version)
Static function which will handle all of the database updates necessary in order to actively bring older versions of host database. |
static void |
mainPatch(Ledger logger,
Interface db,
java.lang.String version)
Static function which will handle all of the database updates necessary in order to actively bring older versions of main database. |
private void |
updateVersion(java.util.List<java.lang.String> updates)
Will cycle through all of the updates and insert them into a singular transaction. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Interface Db
private Ledger Logger
private java.lang.String Version
private static final java.lang.String CLASS
Constructor Detail |
---|
private Patch(Ledger logger, Interface db, java.lang.String version)
logger
- Ledger interface for logging.db
- Direct database handle.version
- Version information.Method Detail |
---|
public static void hostPatch(Ledger logger, Interface db, java.lang.String version)
logger
- Ledger interface for logging.db
- Direct database handle.version
- Version information.public static void mainPatch(Ledger logger, Interface db, java.lang.String version)
logger
- Ledger interface for logging.db
- Direct database handle.version
- Version information.private boolean compareVersion(java.lang.String current, java.lang.String target)
current
- Current version to check.target
- Target version to compare against.
private void confirmHost()
private void confirmMain()
private void updateVersion(java.util.List<java.lang.String> updates)
updates
- List containing all of the updates to complete for a version.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |