|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.jdo.engine.DatabaseRegistry
Field Summary | |
static java.lang.String |
DefaultMapping
|
static java.lang.String |
GenericEngine
The name of the generic SQL engine, if no SQL engine specified. |
Constructor Summary | |
(package private) |
DatabaseRegistry(java.lang.String name,
MappingResolver mapResolver,
PersistenceFactory factory)
Base constructor for a new database registry. |
(package private) |
DatabaseRegistry(java.lang.String name,
MappingResolver mapResolver,
PersistenceFactory factory,
javax.sql.DataSource dataSource)
Construct a new database registry using a DataSource. |
(package private) |
DatabaseRegistry(java.lang.String name,
MappingResolver mapResolver,
PersistenceFactory factory,
java.lang.String jdbcUrl,
java.util.Properties jdbcProps)
Construct a new database registry using a JDBC driver. |
Method Summary | |
static void |
clear()
Reset the database configuration. |
java.sql.Connection |
createConnection()
|
(package private) static java.sql.Connection |
createConnection(LockEngine engine)
|
static DatabaseRegistry |
getDatabaseRegistry(java.lang.Class c)
|
static DatabaseRegistry |
getDatabaseRegistry(java.lang.Object obj)
|
static DatabaseRegistry |
getDatabaseRegistry(java.lang.String name)
|
javax.sql.DataSource |
getDataSource()
|
(package private) static LockEngine |
getLockEngine(java.lang.Class objType)
|
(package private) static LockEngine |
getLockEngine(DatabaseRegistry dbs)
|
MappingResolver |
getMappingResolver()
|
java.lang.String |
getName()
|
static boolean |
hasDatabaseRegistries()
|
static DatabaseRegistry |
initFromDataSource(Mapping mapping,
Database database,
PersistenceFactory factory,
java.lang.ClassLoader classLoader)
Initialize DatabaseRegistry instance using a JDBC DataSource instance. |
static void |
loadDatabase(org.xml.sax.InputSource source,
org.xml.sax.EntityResolver resolver,
java.lang.ClassLoader loader)
Instantiates a database instance from the JDO configuration file |
static void |
loadDatabase(JdoConf jdoConf,
org.xml.sax.EntityResolver resolver,
java.lang.ClassLoader loader)
Instantiates a database instance from an im-memory JDO configuration. |
static javax.sql.DataSource |
loadDataSource(Database database,
java.lang.ClassLoader classLoader)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String GenericEngine
public static java.lang.String DefaultMapping
Constructor Detail |
DatabaseRegistry(java.lang.String name, MappingResolver mapResolver, PersistenceFactory factory, java.lang.String jdbcUrl, java.util.Properties jdbcProps) throws MappingException
name
- The database namemapResolver
- The mapping resolverfactory
- Factory for persistence enginesjdbcUrl
- The JDBC URLjdbcProps
- The JDBC properties
MappingException
- Error occured when creating
persistence engines for the mapping descriptorsDatabaseRegistry(java.lang.String name, MappingResolver mapResolver, PersistenceFactory factory, javax.sql.DataSource dataSource) throws MappingException
name
- The database namemapResolver
- The mapping resolverfactory
- Factory for persistence enginesdataSource
- The data source
MappingException
- Error occured when creating
persistence engines for the mapping descriptorsDatabaseRegistry(java.lang.String name, MappingResolver mapResolver, PersistenceFactory factory) throws MappingException
name
- The database namemapResolver
- The mapping resolverfactory
- Factory for persistence engines
MappingException
- Error occured when creating
persistence engines for the mapping descriptorsMethod Detail |
public MappingResolver getMappingResolver()
public java.lang.String getName()
public javax.sql.DataSource getDataSource()
public static void loadDatabase(JdoConf jdoConf, org.xml.sax.EntityResolver resolver, java.lang.ClassLoader loader) throws MappingException
jdoConf
- An in-memory JDO configuration.resolver
- An entity resolver.loader
- A class loader
MappingException
- If the database cannot be instantiated/loadeed.public static void loadDatabase(org.xml.sax.InputSource source, org.xml.sax.EntityResolver resolver, java.lang.ClassLoader loader) throws MappingException
source
- InputSource
pointing to the JDO configuration.resolver
- An entity resolver.loader
- A class loader
MappingException
- If the database cannot be instantiated/loadeed.public static DatabaseRegistry initFromDataSource(Mapping mapping, Database database, PersistenceFactory factory, java.lang.ClassLoader classLoader) throws MappingException
mapping
- Mapping instance.database
- Configuration of the JDO Database elementfactory
- PersistenceFactory instance.
MappingException
- Problem related to analysing the JDO configuration.public static javax.sql.DataSource loadDataSource(Database database, java.lang.ClassLoader classLoader) throws MappingException
MappingException
public java.sql.Connection createConnection() throws java.sql.SQLException
java.sql.SQLException
static LockEngine getLockEngine(java.lang.Class objType)
static LockEngine getLockEngine(DatabaseRegistry dbs)
public static DatabaseRegistry getDatabaseRegistry(java.lang.Object obj)
public static boolean hasDatabaseRegistries()
public static DatabaseRegistry getDatabaseRegistry(java.lang.Class c)
public static DatabaseRegistry getDatabaseRegistry(java.lang.String name)
static java.sql.Connection createConnection(LockEngine engine) throws java.sql.SQLException
java.sql.SQLException
public static void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |