de.jadv.server.manager
Class FileDatabaseManager

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

public class FileDatabaseManager
extends java.lang.Object
implements DatabaseManager

This class saves all GameObjects into simple files!

Author:
neitzel

Constructor Summary
FileDatabaseManager()
          Constructor of the FileDatabaseManager
 
Method Summary
 void deleteObject(java.lang.String id)
          Delete an Object from the Database
 SavedObject getObject(java.lang.String id)
          Returns the Object, that is stored inside the database or null if there isn't any object available.
 void saveObject(SavedObject obj)
          Save an SavedObject inside the database.
 void 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
 

Constructor Detail

FileDatabaseManager

public FileDatabaseManager()
Constructor of the FileDatabaseManager

Method Detail

deleteObject

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

Specified by:
deleteObject in interface DatabaseManager
Parameters:
id - Id of the Object that should be deleted

getObject

public SavedObject getObject(java.lang.String 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 - The id of the searched object
Returns:
SavedObject : The object or null

saveObject

public void saveObject(SavedObject 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()
Closes the database and the ObjectManager will no longer do anything else!

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