net.sf.imageCave.database
Class DatabaseManager

java.lang.Object
  |
  +--net.sf.imageCave.database.DatabaseManager

public class DatabaseManager
extends java.lang.Object

A simple class that provides an interface for the Database. It creates a thread to initialize the database, periodically write out to the database, and finally shut down the database upon application exit.

Since:
13 March, 2004
Version:
%I%, %G%
Author:
Stuart T. Tett, disc0stu@sf.net
See Also:
Database

Constructor Summary
DatabaseManager()
           
DatabaseManager(CfgFile[] cfgs)
          Constructor
 
Method Summary
 void start()
           
 void stop()
           
 boolean writeOut(DataTable dt, CfgFile cFile)
          Writes to a CfgFile all the information in the corresponding table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseManager

public DatabaseManager(CfgFile[] cfgs)
Constructor


DatabaseManager

public DatabaseManager()
Method Detail

start

public void start()

stop

public void stop()

writeOut

public boolean writeOut(DataTable dt,
                        CfgFile cFile)

Writes to a CfgFile all the information in the corresponding table.

The BNF format of the files is:
         table     := (row)* EOF;
         row       := '[entry]' (statement) * '[/entry]'
         statement := identifier '=' literal ';'
If you don't understand what this means just look in "data/users.cfg" for an example.

Parameters:
cFile -
Returns:
true if successful, false otherwise


Copyright 2004 Brian Lund, Justin Rasmussen, & Stuart Tett. All Rights Reserved.