org.castor.jdo.engine
Class AbstractConnectionFactory
java.lang.Object
org.castor.jdo.engine.AbstractConnectionFactory
- ConnectionFactory
public abstract class AbstractConnectionFactory
extends java.lang.Object
$Revision: 7327 $ $Date: 2006-04-10 16:39:24 -0600 (Mon, 10 Apr 2006) $static String | GENERIC_ENGINE - The name of the generic SQL engine, if no SQL engine specified.
|
GENERIC_ENGINE
public static final String GENERIC_ENGINE
The name of the generic SQL engine, if no SQL engine specified.
AbstractConnectionFactory
protected AbstractConnectionFactory(String name,
String engine,
Mapping mapping,
TransactionManager txManager)
throws MappingException
Constructs a new AbstractConnectionFactory with given name, engine and mapping.
Factory will be ready to use without calling initialize first.
name
- The Name of the database configuration.engine
- The Name of the persistence factory to use.mapping
- The previously loaded mapping.txManager
- The transaction manager to use.
AbstractConnectionFactory
protected AbstractConnectionFactory(JdoConf jdoConf,
int index,
Mapping mapping)
Constructs a new AbstractConnectionFactory with given database and mapping.
Initialize needs to be called before using the factory to create connections.
jdoConf
- The jdo configuartion.index
- Index of the database configuration in the jdo configuration.mapping
- The mapping to load.
getDatabase
public final Database getDatabase()
Get the database configuration.
- The database configuration.
getEngine
public final LockEngine getEngine()
Get the LockEngine only available after initialization.
getMapping
public final Mapping getMapping()
Get the mapping to load.
getName
public final String getName()
Get the name of the database configuration.
- The name of the database configuration.
getTransactionManager
public final TransactionManager getTransactionManager()
Get the transaction manager.
initialize
public final void initialize()
throws MappingException
Initialize factory if it had not been initialized before.
MappingException
- If concrete factory or LockEngine fail to initialize
or mapping could not be loaded.
initializeFactory
public abstract void initializeFactory()
throws MappingException
Initialize the concrete factory.
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com