public final class PoemDatabaseFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PoemDatabaseFactory.PoemShutdownThread
Shutdown databases cleanly when JVM exits.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 databaseDatabase with the name specifiedDatabaseInitialisationPoemException - 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()
Copyright © 2000–2021 PanEris. All rights reserved.