|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.melati.poem.PoemDatabaseFactory
public final class PoemDatabaseFactory
Nested Class Summary | |
---|---|
static class |
PoemDatabaseFactory.PoemShutdownThread
Shutdown databases cleanly when JVM exits. |
Method Summary | |
---|---|
static void |
disconnectDatabase(String name)
Disconnect and disconnect from a known database. |
static void |
disconnectFromDatabases()
Disconnect from all initialised databases. |
static Database |
getDatabase(String name)
Retrieve a database by name. |
static Database |
getDatabase(String name,
String url,
String user,
String password,
String clazz,
String dbmsClass,
boolean addConstraints,
boolean logSQL,
boolean logCommits,
int maxTransactions)
Return a database from the cache or create it. |
static Vector<String> |
getInitialisedDatabaseNames()
Retrieve the names of the databases which have completed initialisation. |
static PoemDatabaseFactory.PoemShutdownThread |
getPoemShutdownThread()
|
static Vector<Database> |
initialisedDatabases()
Retrieve the databases which have completed initialisation. |
static void |
removeDatabase(String name)
Enable a database to be reinitialised, without incurring the full overhead of restarting hsqldb, used in tests. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Vector<Database> initialisedDatabases()
Vector
of the initialised databasespublic static Vector<String> getInitialisedDatabaseNames()
Vector
of the initialised database namespublic static Database getDatabase(String name) throws DatabaseInitialisationPoemException
name
- the name of the database
Database
with the name specified
DatabaseInitialisationPoemException
- if any Exception is trappedpublic static Database getDatabase(String name, String url, String user, String password, String clazz, String dbmsClass, boolean addConstraints, boolean logSQL, boolean logCommits, int maxTransactions)
name
- a short name of the dburl
- a JDBC urluser
- user authorised to access the databse through JDBCpassword
- password for the userclazz
- the name of the (POEM) database classdbmsClass
- the name of the (POEM) dbms classaddConstraints
- whether to add constraints to the databases JDBC meta datalogSQL
- whether SQL statements should be loggedlogCommits
- whether commits should be loggedmaxTransactions
- the number of transactions (one less than the number of
connections)
public static void removeDatabase(String name)
name
- name of db to removepublic static void disconnectDatabase(String name)
name
- name of db to removepublic static void disconnectFromDatabases()
public static PoemDatabaseFactory.PoemShutdownThread getPoemShutdownThread()
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |