org.davesag.generica.persistence
Class ArchivistFactory
java.lang.Object
org.davesag.generica.persistence.ArchivistFactory
- Direct Known Subclasses:
- HibernateArchivistFactory, JdoArchivistFactory
- public abstract class ArchivistFactory
- extends Object
An ArchivistFactory builds the correct Archivist for your needs. Right now
this supports HIBERNATE and JDO.
- Since:
- Generica 1.0
- Version:
- CVS Revision $Id: ArchivistFactory.java,v 1.4 2004/04/06 15:33:23 davesag Exp $
- Author:
- Dave Sag
http://www.davesag.com
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArchivistFactory
public ArchivistFactory()
getArchivist
public static Archivist getArchivist(String type)
throws ArchiveException,
IllegalArgumentException
- load an archvist that delegates to the correct persistence strategy.
- Parameters:
type - Either jdo or hibernate, or the fully qualified class name
of a more specific ArchivistFactory.
- Returns:
- the correct Archivist for the type.
- Throws:
ArchiveException - if something goies wrong with the
persistence system.
IllegalArgumentException - if the type was not a 'jdo' or
'hibernate' and it's not a fully
qualified name of another
ArchivistFactory.
getArchivist
protected abstract Archivist getArchivist()
throws ArchiveException
- Override this method to provide custom archiving.
- Returns:
- The specific Archivist implementation.
- Throws:
ArchiveException - if something went wrong.
Dave Sag Generica API version 0.5.9 - (prerelease) Copyright © 2003 - 2004 Dave Sag.