Class DbUtilDriver


  • public class DbUtilDriver
    extends Object
    This class is the starting point for the account management database utility. This tool provides a way to retrieve and store data in the database which sits behind the Account Management App without the need of a UI. There are four modes in which this tool can be run: GET - This mode pulls down the information stored in the database. A new file is created in the work directory for each domain (table) in the database, and all items (rows) are stored in XML markup. PUT - This mode pushes the information contained in the files in the work directory into the database, overwriting any entries which already exist. The best way to use this feature is to perform a GET first, then edit the files which were produced to add/update any entries. CLEAR - This mode clears out all of the items (rows) in all of the database domains (tables). As a safety precaution, a GET is performed prior to the CLEAR, so that you have a backup of the data which was in the database prior to the clear. Usage Notes: - If you want to remove items (rows) from the database, you can perform a CLEAR, then edit the files which were created in the GET, followed by a PUT. This will ensure that only the items (rows) included in the files are in the database. - A PUT will only perform updates based on what is included in the files in the work directory. If you only want to work with a single domain (table), you can perform a GET, then delete all of the files produced other than the one you'd like to edit. - Performing a GET will overwrite any files produced on a previous run if it is pointed to the same work directory. This is also the case for the GET which is performed automatically prior to a CLEAR. Be careful not to overwrite your edited files when performing either of these functions. - When performing a PUT command, the items (rows) to be added are compared to the existing database. If an item (row) already exists and all of the values are equal, no update occurs (and the database counter is not updated, as this only occurs when an item is changed.)
    Author:
    Bill Branan Date: Dec 21, 2010