com.commsen.stopwatch.storages
Class LoadHSQLInMemoryStorage

java.lang.Object
  extended bycom.commsen.stopwatch.storages.AbstractDatabaseStorage
      extended bycom.commsen.stopwatch.storages.DefaultHSQLInMemoryStorage
          extended bycom.commsen.stopwatch.storages.LoadHSQLInMemoryStorage
All Implemented Interfaces:
StopwatchStorage

Deprecated. use Stopwatch.getLoad(int, int) instead! It works with any engine and storage.

public class LoadHSQLInMemoryStorage
extends DefaultHSQLInMemoryStorage

TODO Dokumentacja

Author:
Milen Dyankov

Field Summary
protected static org.apache.log4j.Logger log
          Deprecated. Logger for this class
 
Fields inherited from class com.commsen.stopwatch.storages.AbstractDatabaseStorage
allByGroupReportStatement, allByLabelReportStatement, allReportStatement, deletePreparedStatement, groupLabelLoadStatement, groupLoadStatement, groupReportStatement, insertPreparedStatement, labelLoadStatement, labelReportStatement, lastIdentityStatement, loadStatement, selectConnection, singleReportStatement, updateConnection, updatePreparedStatement
 
Constructor Summary
LoadHSQLInMemoryStorage()
          Deprecated.  
 
Method Summary
 boolean completeRecord(long id, java.lang.Object[] parameters)
          Deprecated. Instructs the storage to complete (at least remember the time) the record identified by given parameters.
protected  java.lang.String getCreateTableQuery()
          Deprecated. Called to obtain the query to be executed when table needs to be created.
 java.lang.String getInsertQuery()
          Deprecated.  
protected  org.apache.log4j.Logger getLogger()
          Deprecated. Returns the logger for this class
protected  java.lang.String getReturnColumns()
          Deprecated. Called to obtain the columns to be returned.
protected  java.lang.String getTableName()
          Deprecated. Provides the table name
 long newRecord(java.lang.Object[] parameters)
          Deprecated. Instructs the storage to create new record and store passed parameters.
protected  Report[] prepareReports(java.sql.PreparedStatement preparedStatement, java.lang.Object[] params)
          Deprecated. This method simply executes given statement with given params.
 boolean removeRecord(long id)
          Deprecated. Instructs the storage to remove the record identified by given parameters.
 
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, getReport, getReports, getSingleReportQuery, getUpdateQuery, isDebug, newCompleteRecord, open, unfreeze
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log
Deprecated. 
Logger for this class

Constructor Detail

LoadHSQLInMemoryStorage

public LoadHSQLInMemoryStorage()
Deprecated. 
Method Detail

getTableName

protected java.lang.String getTableName()
Deprecated. 
Description copied from class: AbstractDatabaseStorage
Provides the table name

Overrides:
getTableName in class DefaultHSQLInMemoryStorage

getCreateTableQuery

protected java.lang.String getCreateTableQuery()
Deprecated. 
Description copied from class: AbstractDatabaseStorage
Called to obtain the query to be executed when table needs to be created.

Default is:

 create table AbstractDatabaseStorage.getTableName() (
 	_id INT GENERATED BY DEFAULT AS IDENTITY,
 	_group VARCHAR,
 	_label VARCHAR,
 	_start TIMESTAMP,
 	_end TIMESTAMP
 )
 

Overrides:
getCreateTableQuery in class AbstractDatabaseStorage
Returns:
SQL query to create table

getReturnColumns

protected java.lang.String getReturnColumns()
Deprecated. 
Description copied from class: AbstractDatabaseStorage
Called to obtain the columns to be returned. The columns returned by this method are used in all report queries.

Overrides:
getReturnColumns in class DefaultHSQLInMemoryStorage

getInsertQuery

public java.lang.String getInsertQuery()
Deprecated. 
Overrides:
getInsertQuery in class AbstractDatabaseStorage

newRecord

public long newRecord(java.lang.Object[] parameters)
               throws StopwatchStorageException
Deprecated. 
Description copied from interface: StopwatchStorage
Instructs the storage to create new record and store passed parameters. Engines should know what parameters storage expects.

Specified by:
newRecord in interface StopwatchStorage
Overrides:
newRecord in class AbstractDatabaseStorage
Throws:
StopwatchStorageException
See Also:
StopwatchStorage.newRecord(java.lang.Object[])

completeRecord

public boolean completeRecord(long id,
                              java.lang.Object[] parameters)
                       throws StopwatchStorageException
Deprecated. 
Description copied from interface: StopwatchStorage
Instructs the storage to complete (at least remember the time) the record identified by given parameters. Engines should know what parameters storage expects. Most storages will assume that parameters passed uniquely identify only one record.

Specified by:
completeRecord in interface StopwatchStorage
Overrides:
completeRecord in class AbstractDatabaseStorage
Throws:
StopwatchStorageException
See Also:
StopwatchStorage.completeRecord(long, Object[])

removeRecord

public boolean removeRecord(long id)
                     throws StopwatchStorageException
Deprecated. 
Description copied from interface: StopwatchStorage
Instructs the storage to remove the record identified by given parameters. Engines should know what parameters storage expects. Most storages will assume that parameters passed uniquely identify only one record.

Specified by:
removeRecord in interface StopwatchStorage
Overrides:
removeRecord in class AbstractDatabaseStorage
Throws:
StopwatchStorageException
See Also:
StopwatchStorage.removeRecord(long)

prepareReports

protected Report[] prepareReports(java.sql.PreparedStatement preparedStatement,
                                  java.lang.Object[] params)
                           throws java.sql.SQLException
Deprecated. 
Description copied from class: AbstractDatabaseStorage
This method simply executes given 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.

Overrides:
prepareReports in class AbstractDatabaseStorage
Parameters:
preparedStatement - the prepared statement to execute
params - the params to passed to the prepared statement
Returns:
array of Report
Throws:
java.sql.SQLException - on database connection error or other errors
See Also:
AbstractDatabaseStorage.prepareReports(java.sql.PreparedStatement, java.lang.Object[])

getLogger

protected org.apache.log4j.Logger getLogger()
Deprecated. 
Description copied from class: AbstractDatabaseStorage
Returns the logger for this class

Overrides:
getLogger in class DefaultHSQLInMemoryStorage


Copyright 2006-2006 Commsen International. All Rights Reserved.