|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.commsen.stopwatch.storages.AbstractDatabaseStorage
com.commsen.stopwatch.storages.DefaultHSQLStorage
com.commsen.stopwatch.storages.MemoryHSQLStorage
public class MemoryHSQLStorage
TODO Dokumentacja
| Field Summary |
|---|
| Fields inherited from class com.commsen.stopwatch.storages.AbstractDatabaseStorage |
|---|
allByGroupReportStatement, allByLabelReportStatement, allReportStatement, deletePreparedStatement, groupLabelLoadStatement, groupLoadStatement, groupReportStatement, insertPreparedStatement, labelLoadStatement, labelReportStatement, lastIdentityStatement, loadStatement, properties, singleReportStatement, updatePreparedStatement |
| Constructor Summary | |
|---|---|
MemoryHSQLStorage()
|
|
| Method Summary | |
|---|---|
boolean |
completeRecord(long id,
java.lang.Object[] parameters)
Instructs the storage to complete (at least remember the time) the record identified by given parameters. |
protected java.lang.String |
getCreateTableQuery()
Called to obtain the query to be executed when table needs to be created. |
java.lang.String |
getInsertQuery()
|
protected org.apache.log4j.Logger |
getLogger()
Returns the logger for this class |
protected java.lang.String |
getReturnColumns()
Called to obtain the columns to be returned. |
protected java.lang.String |
getTableName()
Provides the table name |
protected java.lang.String |
getUpdateQuery()
|
long |
newRecord(java.lang.Object[] parameters)
Instructs the storage to create new record and store passed parameters. |
protected Report[] |
prepareReports(java.sql.PreparedStatement preparedStatement,
java.lang.Object[] params)
This method simply executes given statement with given params. |
| Methods inherited from class com.commsen.stopwatch.storages.DefaultHSQLStorage |
|---|
close, freeze, getConnectionString, getDriver, getLastIdentityQuery, getPassword, getUser, isDebugEnabled, setDebugEnabled |
| Methods inherited from class com.commsen.stopwatch.storages.AbstractDatabaseStorage |
|---|
getAllByGroupReportQuery, getAllByGroupReports, getAllByLabelReportQuery, getAllByLabelReports, getAllReportQuery, getCheckTableQuery, getDeleteQuery, getGroupBy, getGroupLabelLoadQuery, getGroupLoadQuery, getGroupReportQuery, getGroupReports, getLabelLoadQuery, getLabelReportQuery, getLabelReports, getLoad, getLoadQuery, getOrderBy, getProperties, getReport, getReports, getSingleReportQuery, getTruncTableQuery, isDebug, newCompleteRecord, open, removeRecord, setProperties, unfreeze |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryHSQLStorage()
| Method Detail |
|---|
protected java.lang.String getTableName()
AbstractDatabaseStorage
getTableName in class DefaultHSQLStorageAbstractDatabaseStorage.getTableName()protected java.lang.String getCreateTableQuery()
AbstractDatabaseStorage
Default is:
create table
AbstractDatabaseStorage.getTableName() (
_id INT GENERATED BY DEFAULT AS IDENTITY,
_group VARCHAR,
_label VARCHAR,
_start TIMESTAMP,
_end TIMESTAMP
)
getCreateTableQuery in class AbstractDatabaseStorageprotected java.lang.String getReturnColumns()
AbstractDatabaseStorage
getReturnColumns in class DefaultHSQLStoragepublic java.lang.String getInsertQuery()
getInsertQuery in class AbstractDatabaseStorageprotected java.lang.String getUpdateQuery()
getUpdateQuery in class AbstractDatabaseStorage
public long newRecord(java.lang.Object[] parameters)
throws StopwatchStorageException
StopwatchStorage
newRecord in interface StopwatchStoragenewRecord in class AbstractDatabaseStorageStopwatchStorageExceptionStopwatchStorage.newRecord(java.lang.Object[])
public boolean completeRecord(long id,
java.lang.Object[] parameters)
throws StopwatchStorageException
StopwatchStorage
completeRecord in interface StopwatchStoragecompleteRecord in class AbstractDatabaseStorageid - of the database record to be updatedparameters - used to find the record
true if record was completed successfuly, false otherwise
StopwatchStorageException - on errorStopwatchStorage.completeRecord(long, Object[])
protected Report[] prepareReports(java.sql.PreparedStatement preparedStatement,
java.lang.Object[] params)
throws java.sql.SQLException
AbstractDatabaseStoragestatement with given params.
All report queries call this method to obtain array of reports. This method should be
overwriten by extending classes that need to provide more measurment information then basic
time and count.
prepareReports in class AbstractDatabaseStoragepreparedStatement - params - the params to passed to the prepared statement
java.sql.SQLExceptionprotected org.apache.log4j.Logger getLogger()
AbstractDatabaseStorage
getLogger in class DefaultHSQLStorage
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||