blackboard.persist
Class DbLoaderFactory<T extends Loader>

java.lang.Object
  extended by blackboard.persist.DbLoaderFactory<T>

public class DbLoaderFactory<T extends Loader>
extends java.lang.Object

Helper factory class for implementing the "default" objects in loaders. This requires less code to be written in the loader interface. Now, to create the "default" factory, you do this: public static final DbPersisterFactory Default = DbPersisterFactory.newInstance(FooDbLoader.class); Though it is not an actual class in the loader interface, the client code will interact with it in the same way all current code does.

Since:
7.2
Version:
$Revision: #1 $ $Date: 2007/06/27 $

Method Summary
 T getInstance()
           
static
<T extends Loader>
DbLoaderFactory<T>
newInstance(java.lang.Class<T> cls)
          Create a new instance of the factory for accessing the loader implementation.
static
<T extends Loader>
DbLoaderFactory<T>
newInstance(java.lang.Class<T> cls, java.lang.String key)
          Create a new instance of the factory for accessing the loader implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static final <T extends Loader> DbLoaderFactory<T> newInstance(java.lang.Class<T> cls)
Create a new instance of the factory for accessing the loader implementation. The resulting factory will use the fully qualified classname for locating the loader implementation

Type Parameters:
T - The Loader type
Parameters:
cls - The class representing the loader type
Returns:
An instance of the factory

newInstance

public static final <T extends Loader> DbLoaderFactory<T> newInstance(java.lang.Class<T> cls,
                                                                      java.lang.String key)
Create a new instance of the factory for accessing the loader implementation. The resulting factory will use the key parameter to find the loader implementation the loader implementation

Type Parameters:
T - The Loader type
Parameters:
cls - The class representing the loader type
key - the key to use for finding the loader implementation
Returns:
An instance of the factory

getInstance

public T getInstance()
                             throws PersistenceException
Throws:
PersistenceException


Copyright © 2003 Blackboard, Inc. All Rights Reserved.