|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.jdo.engine.DatabaseContext
public final class DatabaseContext
| Field Summary | |
|---|---|
static String |
GENERIC_ENGINE
The name of the generic SQL engine, if no SQL engine specified. |
| Constructor Summary | |
|---|---|
protected |
DatabaseContext(JdoConf jdoConf,
int index,
Mapping mapping,
ConnectionFactory factory)
Constructs a new AbstractConnectionFactory with given database and mapping. |
protected |
DatabaseContext(String name,
String engine,
Mapping mapping,
TransactionManager txManager,
ConnectionFactory factory)
Constructs a new AbstractConnectionFactory with given name, engine and mapping. |
| Method Summary | |
|---|---|
ConnectionFactory |
getConnectionFactory()
|
Database |
getDatabase()
Get the database configuration. |
LockEngine |
getEngine()
Get the LockEngine only available after initialization. |
Mapping |
getMapping()
Get the mapping to load. |
String |
getName()
Get the name of the database configuration. |
TransactionManager |
getTransactionManager()
Get the transaction manager. |
void |
initialize()
Initialize factory if it had not been initialized before. |
void |
initializeFactory()
Method initializing ConnectionFactory. |
void |
setClassDescriptorResolver(JDOClassDescriptorResolver classDescriptorResolver)
Sets a custom ClassDescriptorResolver instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String GENERIC_ENGINE
| Constructor Detail |
|---|
protected DatabaseContext(String name,
String engine,
Mapping mapping,
TransactionManager txManager,
ConnectionFactory factory)
throws MappingException
name - The Name of the database configuration.engine - The Name of the persistence factory to use.txManager - The transaction manager to use.mapping - The previously loaded mapping.
MappingException - If LockEngine could not be initialized.
protected DatabaseContext(JdoConf jdoConf,
int index,
Mapping mapping,
ConnectionFactory factory)
jdoConf - The JDO configuration.index - Index of the database configuration in the JDO configuration.mapping - The mapping to load.| Method Detail |
|---|
public void initialize()
throws MappingException
MappingException - If concrete factory or LockEngine fail to initialize
or mapping could not be loaded.
public void initializeFactory()
throws MappingException
MappingException - If concrete factory could not be initialized.public ConnectionFactory getConnectionFactory()
public String getName()
public Database getDatabase()
public Mapping getMapping()
public TransactionManager getTransactionManager()
public LockEngine getEngine()
public void setClassDescriptorResolver(JDOClassDescriptorResolver classDescriptorResolver)
ClassDescriptorResolver instance.
classDescriptorResolver - A custom ClassDescriptorResolver instance to be used.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||