|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lightdev.lib.sam.JDBCAdapter
com.lightdev.app.trec.server.EmbeddedDerbyAdapter
public class EmbeddedDerbyAdapter
Adapter to an embedded Derby database implementation of the SAM framework
| Field Summary |
|---|
| Fields inherited from class com.lightdev.lib.sam.JDBCAdapter |
|---|
RB_KEY_DB_DRIVER_NAME, RB_KEY_DB_NAME, RB_KEY_DB_PREFIX, RB_KEY_DB_PW, RB_KEY_DB_SERVER_NAME, RB_KEY_DB_USER_NAME |
| Constructor Summary | |
|---|---|
EmbeddedDerbyAdapter(String baseDir)
create a new instance of a EmbeddedDerbyAdapter object |
|
| Method Summary | |
|---|---|
void |
backup(String backupDirectory)
backup the SAM database of this adapter to a given backup directory. |
void |
destroy()
|
Vector |
getAvailableBackups()
|
Connection |
getConnection()
get a connection to the database |
String |
getConnectString()
assemble a Derby connect string such as jdbc:derby:url_to_db/db_name;user=name;password=pw |
void |
restore(String backupDirectory)
restore the SAM database of this adapter from a given backup directory. |
boolean |
supportsTransactions()
determine whether or not the database can handle transactions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EmbeddedDerbyAdapter(String baseDir)
baseDir - the base directory in which the database is located| Method Detail |
|---|
public void destroy()
destroy in class JDBCAdapter
public void backup(String backupDirectory)
throws Exception
backupDirectory - the diretory to backup the database to; this adapter
builds a backup directory using scheme [base dir]/sambackup/[backupDirectory].
Exception
public void restore(String backupDirectory)
throws SQLException
backupDirectory - the diretory to restore the database from; this adapter
builds a directory using scheme [base dir]/sambackup/[backupDirectory] to restore from.
SQLExceptionpublic Vector getAvailableBackups()
public Connection getConnection()
throws Exception
getConnection in class JDBCAdapterSQLException - is something goes wrong with establishing the connection
Exceptionpublic boolean supportsTransactions()
supportsTransactions in class JDBCAdapterpublic String getConnectString()
getConnectString in class JDBCAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||