|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.logbook.ElogUtility
ElogUtility provides convenience methods for interacting with the Elog database.
| Field Summary | |
protected java.sql.Connection |
_connection
database connection |
protected ConnectionDictionary |
_connectionDictionary
connection dictionary |
protected DatabaseAdaptor |
_databaseAdaptor
database adaptor |
protected java.sql.CallableStatement |
_postEntry
Stored procedure for posting an Elog entry |
| Constructor Summary | |
ElogUtility(ConnectionDictionary dictionary)
ElogUtility constructor Uses the default database adaptor. |
|
ElogUtility(DatabaseAdaptor adaptor,
ConnectionDictionary dictionary)
ElogUtility constructor |
|
| Method Summary | |
static ElogUtility |
defaultUtility()
Get the default elog utility which uses the default connection dictionary and the default database adaptor. |
void |
postEntry(java.lang.String logbook,
java.lang.String title,
java.lang.String content)
Post an entry to a logbook using the account of the user logged in. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.sql.Connection _connection
protected ConnectionDictionary _connectionDictionary
protected DatabaseAdaptor _databaseAdaptor
protected java.sql.CallableStatement _postEntry
| Constructor Detail |
public ElogUtility(ConnectionDictionary dictionary)
throws DatabaseException
dictionary - The connection dictionary.
DatabaseException - if an exception occurs while connecting to the database
public ElogUtility(DatabaseAdaptor adaptor,
ConnectionDictionary dictionary)
throws DatabaseException
adaptor - The database adaptor to usedictionary - The connection dictionary.
DatabaseException - if an exception occurs while connecting to the database| Method Detail |
public static ElogUtility defaultUtility()
throws DatabaseException
DatabaseException - if an exception occurs while connecting to the databaseConnectionDictionary.defaultDictionary()
public void postEntry(java.lang.String logbook,
java.lang.String title,
java.lang.String content)
throws DatabaseException
logbook - The name of the logbook to which we are posting the entrytitle - The title of the entry to postcontent - The content of the entry to post
DatabaseException - if a database exception occurs while posting an entry
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||