org.openmobileis.database.fastobjectdb
Class FastObjectDBManager

java.lang.Object
  extended byorg.openmobileis.database.fastobjectdb.FastObjectDBManager
All Implemented Interfaces:
FastObjectDBManagerService
Direct Known Subclasses:
SynchroFastObjectDBManager

public class FastObjectDBManager
extends java.lang.Object
implements FastObjectDBManagerService

Factory pattern to manage one FODb inside an application. Use to get the current db factory instance. Use the PropertiesManager fastobjectdb.database.path and fastobjectdb.database.name properties to define db path and name.

Since:
JDK 1.1
Version:
1.0.
Author:
Philippe Delrieu

Field Summary
protected static java.util.Hashtable cypherList
           
protected  FastObjectDB db
           
protected  boolean fodbStarted
           
protected static FastObjectDBManager manager
           
 
Constructor Summary
protected FastObjectDBManager()
           
 
Method Summary
 void flushDB()
          Use to reload all db file headers.
 FastObjectDB getCurrentFODB()
          return the current FODB instance.
static FastObjectDBManager getManager()
           
 boolean isFodbStarted()
           
static void registerManager(FastObjectDBManager newManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cypherList

protected static java.util.Hashtable cypherList

db

protected FastObjectDB db

fodbStarted

protected boolean fodbStarted

manager

protected static FastObjectDBManager manager
Constructor Detail

FastObjectDBManager

protected FastObjectDBManager()
Method Detail

registerManager

public static final void registerManager(FastObjectDBManager newManager)

getManager

public static final FastObjectDBManager getManager()

getCurrentFODB

public FastObjectDB getCurrentFODB()
                            throws DatabaseException
return the current FODB instance. Open or create it if not done.

Specified by:
getCurrentFODB in interface FastObjectDBManagerService
Returns:
the current database instance.
Throws:
DatabaseException

isFodbStarted

public boolean isFodbStarted()
Specified by:
isFodbStarted in interface FastObjectDBManagerService

flushDB

public void flushDB()
             throws DatabaseException
Use to reload all db file headers.

Specified by:
flushDB in interface FastObjectDBManagerService
Throws:
DatabaseException


Copyright 2006 OpenMobileIS. All Rights Reserved.