de.jadv.server.manager
Class HSQLDBDatabaseManager

java.lang.Object
  |
  +--de.jadv.server.manager.HSQLDBDatabaseManager
All Implemented Interfaces:
DatabaseManager

public class HSQLDBDatabaseManager
extends java.lang.Object
implements DatabaseManager

This class handles all needed accesses for the ObjectManager UNTESTED! I haven't used this Class for quite some time now! (But it should work fine ...)

Author:
neitzel

Field Summary
private  java.sql.Connection _db_conn
           
 
Constructor Summary
HSQLDBDatabaseManager()
          Constructor
 
Method Summary
private  void createTables()
          createTables Create the needed Tables!
 void deleteObject(java.lang.String id)
          deleteObject(id) Delete an Object from the Database
 SavedObject getObject(java.lang.String id)
          getObject(id) Returns the Object, that is stored inside the database or null if there isn't any object available.
private  void query(java.lang.String expression)
          query(Expression) Does a query on the database.
 void saveObject(SavedObject obj)
          saveObject(obj) Save an SavedObject inside the database.
 void shutdown()
          shutdown() Closes the database and the ObjectManager will no longer do anything else!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_db_conn

private java.sql.Connection _db_conn
Constructor Detail

HSQLDBDatabaseManager

public HSQLDBDatabaseManager()
Constructor

Method Detail

createTables

private void createTables()
createTables Create the needed Tables!


deleteObject

public void deleteObject(java.lang.String id)
deleteObject(id) Delete an Object from the Database

Specified by:
deleteObject in interface DatabaseManager
Parameters:
id -

getObject

public SavedObject getObject(java.lang.String id)
getObject(id) Returns the Object, that is stored inside the database or null if there isn't any object available.

Specified by:
getObject in interface DatabaseManager
Parameters:
id -
Returns:
SavedObject

query

private void query(java.lang.String expression)
            throws java.sql.SQLException
query(Expression) Does a query on the database. The result is simply thrown away!

Parameters:
expression -
Throws:
java.sql.SQLException

saveObject

public void saveObject(SavedObject obj)
saveObject(obj) Save an SavedObject inside the database. If the id of the object is zero, a new id will be saved inside the database.

Specified by:
saveObject in interface DatabaseManager
Parameters:
obj -

shutdown

public void shutdown()
shutdown() Closes the database and the ObjectManager will no longer do anything else!

Specified by:
shutdown in interface DatabaseManager
Throws:
java.lang.Exception