Package clickTrainDetector.logging
Class ClickTrainDetLogging
java.lang.Object
generalDatabase.SQLLogging
generalDatabase.SuperDetLogging
clickTrainDetector.logging.ClickTrainDetLogging
Functions for saving a click train.
- Author:
 - Jamie Macaulay
 
- 
Field Summary
Fields inherited from class generalDatabase.SuperDetLogging
SUBTABLECLAUSE_PARENTDATABASEID, SUBTABLECLAUSE_PARENTUID, SUBTABLECLAUSE_TIMEFields inherited from class generalDatabase.SQLLogging
superDetLogging, UPDATE_POLICY_OVERWRITE, UPDATE_POLICY_WRITENEW - 
Constructor Summary
ConstructorsConstructorDescriptionClickTrainDetLogging(ClickTrainControl clickTrainControl, ClickTrainDataBlock<CTDataUnit> pamDataBlock)  - 
Method Summary
Modifier and TypeMethodDescriptionCreate the basic table definition for the group detection.protected CTDataUnitcreateDataUnit(SQLTypes sqlTypes, long timeMilliseconds, int databaseIndex) Turn the data, which have been transferred back into the PamTableItems back into a usable data.Reference to the click train control.getViewerLoadClause(SQLTypes sqlTypes, PamViewParameters pvp) Get a standard select clause for loading viewer data, this is basically that UTC is between two times.booleanlogData(PamConnection con, PamDataUnit dataUnit, PamDataUnit superDetection) Called when a new PamDataUnit is added to a PamDataBlock to write those data to the database.booleanreLogData(PamConnection con, PamDataUnit dataUnit, PamDataUnit superDetection) Called when an old PamDataUnit is updated.voidsetTableData(SQLTypes sqlTypes, 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.SuperDetLogging
anySubTableItems, checkSubTableCount, countSubTableItems, deleteData, deleteIndexedItems, doSubTableUIDRepairs, getEventEndTimeItem, getSubLogging, getSubTableClausePolicy, insertCursorRow, isCreateDataUnits, loadViewData, saveOfflineData, setCreateDataUnits, setEventEndTimeItem, setSubLogging, setSubTableClausePolicy, updateCursorRowMethods inherited from class generalDatabase.SQLLogging
addAddOn, clearAllAddOns, countTableItems, countTableItems, createEarlyResultSet, createInClause, createViewResultSet, createViewResultSet, deleteData, deleteData, deleteSubtableItem, deleteSubtableItems, doExtraChecks, double2Float, fillTableData, finalize, findClosestDataPoint, findLogger, getBaseTableDefinition, getEarlyLoadClause, getIdListUpdatClause, getLastLoadIndex, getLastLoadUID, getLastTime, getLoggingAddOns, getPamDataBlock, getTableDefinition, getTimesUpdateClause, getUIDMatchClause, getUpdatePolicy, getViewerCursorFinder, getViewerEverythingClause, getViewerLessThanClause, getViewerOverlapClause, getViewerUpdateClause, isCanView, isLoadViewData, loadDataFrom, loadEarlyData, loadEarlyData, loadLastDataUnit, loadSubtableData, loadSubtableData, loadViewData, loadViewerData, logData, logSubtableData, prepareEmulation, prepareForMixedMode, readLastData, readMixedModeData, readNextEmulation, reCheckTable, reLogData, removeAddOn, removeAddOn, reset, setCanView, setColumnData, setLoadViewData, setTableDefinition, setUpdatePolicy, transferDataFromResult, updateSubtable 
- 
Constructor Details
- 
ClickTrainDetLogging
public ClickTrainDetLogging(ClickTrainControl clickTrainControl, ClickTrainDataBlock<CTDataUnit> pamDataBlock)  
 - 
 - 
Method Details
- 
createBaseTable
Create the basic table definition for the group detection.- Returns:
 - basic table - annotations will be added shortly !
 
 - 
setTableData
Description copied from class:SQLLoggingCallback 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:
 setTableDatain classSQLLogging- Parameters:
 pamDataUnit-
 - 
getClickTrainControl
Reference to the click train control.- Returns:
 - the detectionGroupControl.
 
 - 
createDataUnit
Description copied from class:SQLLoggingTurn the data, which have been transferred back into the PamTableItems back into a usable data. Don't add to datablock. This will happen in calling function after additional add-ons and annotations have been added to the data unit. .- Overrides:
 createDataUnitin classSQLLogging- Returns:
 - true if a data unit was successfully created
 
 - 
getViewerLoadClause
Description copied from class:SQLLoggingGet a standard select clause for loading viewer data, this is basically that UTC is between two times.- Overrides:
 getViewerLoadClausein classSQLLogging- Parameters:
 sqlTypes- SQL types - database specific functionspvp- load parameters.- Returns:
 - Clause, in the form WHERE UTC BETWEEN A and B ORDER BY UTC
 
 - 
logData
Description copied from class:SQLLoggingCalled 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:
 logDatain classSuperDetLogging- Parameters:
 con- Database ConnectiondataUnit- Pamguard Data unit.superDetection- reference to a super detection so additional cross referencing can be filled- Returns:
 - true if written and new index of dataUnit retrieved OK
 - See Also:
 
 - 
reLogData
Description copied from class:SQLLoggingCalled when an old PamDataUnit is updated. The record is either updated or a new record is written, but cross referenced to the old unit for bookkeeping purposes based on the updatePolicy flag.- Overrides:
 reLogDatain classSuperDetLogging- Parameters:
 con- Database ConnectiondataUnit- Pamguard Data unit.superDetection- reference to a super detection so additional cross referencing can be filled- Returns:
 - the number of rows written to the database.
 - See Also:
 
 
 -