com.syncbuilder.storage
Class DatabaseImplFactory

java.lang.Object
  |
  +--com.syncbuilder.storage.DatabaseImplFactory

public class DatabaseImplFactory
extends java.lang.Object

This class organizes a global list of known specializations of DatabaseImpl.
It can accept registrations of new DatabaseImpls and it can find previously registered DatabaseImpls through different criteria.
There is no need to register the DatabaseImpls of the built-in applications, because these are already known to the factory.


Method Summary
static DatabaseImpl findDatabaseImplByCreator(Char4 creator)
           
static DatabaseImpl findDatabaseImplByName(java.lang.String dbname)
           
static void registerDatabaseImpl(DatabaseImpl dbimpl)
          Register an instance of DatabaseImpl with the factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findDatabaseImplByName

public static DatabaseImpl findDatabaseImplByName(java.lang.String dbname)

findDatabaseImplByCreator

public static DatabaseImpl findDatabaseImplByCreator(Char4 creator)

registerDatabaseImpl

public static void registerDatabaseImpl(DatabaseImpl dbimpl)
Register an instance of DatabaseImpl with the factory. The instances will be registered through both their name and their creator ID.
The very same instance will be returned later, when you ask the factory to return a DatabaseImpl with the given name or creator.

Any DatabaseImpl which you want to register through this method needs to have a proper (non null) name and creator ID.

Some applications (e.g. the built-in applications) have their name and creator ID hard-coded into their DatabaseImpl. Other applications (e.g. the "generic" application) do not have this information hard-coded into their DatabaseImpl, but you first need to instantiate their DatabaseImpl with the required information before you can register it through this method.



This material is Copyrighted (C) 1999 by Tilo Christ. All Rights Reserved.