whistleDetector
Class WhistleEventLogger

java.lang.Object
  extended by generalDatabase.SQLLogging
      extended by whistleDetector.WhistleEventLogger

public class WhistleEventLogger
extends SQLLogging


Field Summary
(package private)  java.sql.Connection connection
           
(package private)  PamTableItem duration
           
(package private)  PamTableItem endTime
           
(package private)  PamTableItem nWhistles
           
(package private)  PamTableItem startTime
           
(package private)  PamTableDefinition tableDef
           
(package private)  WhistleEventDetector whistleEventDetector
           
 
Fields inherited from class generalDatabase.SQLLogging
UPDATE_POLICY_OVERWRITE, UPDATE_POLICY_WRITENEW
 
Constructor Summary
WhistleEventLogger(WhistleEventDetector whistleEventDetector, PamDataBlock pamDataBlock)
           
 
Method Summary
 boolean logData(java.sql.Connection con, PamDataUnit dataUnit)
          Called when a new PamDataUnit is added to a PamDataBlock to write those data to the database.
 boolean logData(PamDataUnit dataUnit)
           
 void setTableData(PamDataUnit pamDataUnit)
          Callback function when new data are created that allows the user to set the data for each column.
 
Methods inherited from class generalDatabase.SQLLogging
createDataUnit, createInClause, createViewResultSet, doExtraChecks, fillTableData, finalize, findLogger, getIdListUpdatClause, getLastTime, getPamDataBlock, getTableDefinition, getTimesUpdateClause, getUpdatePolicy, getViewerCursorFinder, getViewerLoadClause, getViewerUpdateClause, isCanView, isLoadViewData, loadViewData, loadViewerData, prepareEmulation, prepareForMixedMode, readLastData, readMixedModeData, readNextEmulation, reCheckTable, reLogData, saveOfflineData, setCanView, setColumnData, setLoadViewData, setTableDefinition, setUpdatePolicy, transferDataFromResult
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

whistleEventDetector

WhistleEventDetector whistleEventDetector

connection

java.sql.Connection connection

tableDef

PamTableDefinition tableDef

startTime

PamTableItem startTime

endTime

PamTableItem endTime

duration

PamTableItem duration

nWhistles

PamTableItem nWhistles
Constructor Detail

WhistleEventLogger

public WhistleEventLogger(WhistleEventDetector whistleEventDetector,
                          PamDataBlock pamDataBlock)
Method Detail

setTableData

public void setTableData(PamDataUnit pamDataUnit)
Description copied from class: SQLLogging
Callback function when new data are created that allows the user to set the data for each column. Columns that have data which can be filled automatically (counters, primary keys and columns cross referenced to data in other tables) are filled automatically in fillTableData()

Specified by:
setTableData in class SQLLogging

logData

public boolean logData(java.sql.Connection con,
                       PamDataUnit dataUnit)
Description copied from class: SQLLogging
Called when a new PamDataUnit is added to a PamDataBlock to write those data to the database. Functionality moved down to PamCursor so that exact writing method can become database specific if necessary.

Overrides:
logData in class SQLLogging
Parameters:
con - Database Connection
dataUnit - Pamguard Data unit.
Returns:
true if written and new index of dataUnit retreived OK
See Also:
PamDataUnit

logData

public boolean logData(PamDataUnit dataUnit)