|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.commsen.stopwatch.storages.AbstractDatabaseStorage com.commsen.stopwatch.storages.DefaultHSQLInMemoryStorage com.commsen.stopwatch.storages.MemoryHSQLInMemoryStorage
public class MemoryHSQLInMemoryStorage
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 | |
---|---|
MemoryHSQLInMemoryStorage()
|
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.DefaultHSQLInMemoryStorage |
---|
close, freeze, getConnectionString, getDriver, getLastIdentityQuery, getPassword, getTruncTableQuery, 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, 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 MemoryHSQLInMemoryStorage()
Method Detail |
---|
protected java.lang.String getTableName()
AbstractDatabaseStorage
getTableName
in class DefaultHSQLInMemoryStorage
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 AbstractDatabaseStorage
protected java.lang.String getReturnColumns()
AbstractDatabaseStorage
getReturnColumns
in class DefaultHSQLInMemoryStorage
public java.lang.String getInsertQuery()
getInsertQuery
in class AbstractDatabaseStorage
protected java.lang.String getUpdateQuery()
getUpdateQuery
in class AbstractDatabaseStorage
public long newRecord(java.lang.Object[] parameters) throws StopwatchStorageException
StopwatchStorage
newRecord
in interface StopwatchStorage
newRecord
in class AbstractDatabaseStorage
StopwatchStorageException
StopwatchStorage.newRecord(java.lang.Object[])
public boolean completeRecord(long id, java.lang.Object[] parameters) throws StopwatchStorageException
StopwatchStorage
completeRecord
in interface StopwatchStorage
completeRecord
in class AbstractDatabaseStorage
id
- 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
AbstractDatabaseStorage
statement
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 AbstractDatabaseStorage
preparedStatement
- params
- the params to passed to the prepared statement
java.sql.SQLException
protected org.apache.log4j.Logger getLogger()
AbstractDatabaseStorage
getLogger
in class DefaultHSQLInMemoryStorage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |