public class DBProcess extends PamProcess
Modifier and Type | Method and Description |
---|---|
boolean |
changeColumnFormat(java.lang.String tableName,
PamTableItem tableItem)
Change the format of a column.
|
boolean |
checkColumn(EmptyTableDefinition tableDef,
PamTableItem tableItem)
Check a database table column exists.
|
boolean |
checkTable(EmptyTableDefinition tableDef)
Check a database table.
|
void |
checkTables() |
boolean |
clearTable(EmptyTableDefinition tableDef)
Completely clear the contents of a table
|
boolean |
clearTable(java.lang.String tableName) |
boolean |
columnExists(EmptyTableDefinition tableDef,
PamTableItem tableItem)
Check that a specific table column exists
|
LogSettings |
getLogLastSettings() |
LogSettings |
getLogSettings() |
LogSettings |
getLogViewerSettings() |
void |
newData(PamObservable o,
PamDataUnit dataUnit) |
void |
pamStart()
Called for each process to tell it to start (may not be necessary for
processes which are listening for data anyway).
|
void |
pamStop()
Stops the process.
|
boolean |
renameTable(java.lang.String oldName,
java.lang.String newName) |
boolean |
saveSettingsToDB()
Called from the settings manager whenever settings would normally be saved to
file.
|
boolean |
tableExists(EmptyTableDefinition tableDef)
Check a database table exists.
|
void |
updateData(PamObservable o,
PamDataUnit dataUnit) |
void |
updateProcessList() |
absMillisecondsToSamples, absSamplesToMilliseconds, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, fillXMLElement, flushDataBlockBuffers, getAncestorDataBlock, getAnnotation, getChainPosition, getCpuPercent, getNumAnnotations, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOutputDataBlock, getOutputDataBlocks, getPamControlledUnit, getParentDataBlock, getParentProcess, getProcessName, getRawSourceDataBlock, getRequiredDataHistory, getSampleRate, getSourceDataBlock, getSourceProcess, isCanMultiThread, makePamProcess, masterClockUpdate, noteNewSettings, notifyModelChanged, prepareProcess, processNewBuoyData, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setParentDataBlock, setParentDataBlock, setProcessName, setSampleRate, setupProcess, toString, update
public DBProcess(DBControl databaseControll)
public void pamStart()
PamProcess
pamStart
in class PamProcess
public void pamStop()
PamProcess
pamStop
in class PamProcess
public boolean saveSettingsToDB()
The logSettings object does a slightly different task of always storing the current PAMGAURD settings in a table which grows and grows, giving a permanent record of PAMGUARD settings over time.
Unlike the settings in the growing table of logSettings, the settings stored from logLastSettings are also stored when viewer or mixed mode is exited.
public void checkTables()
public boolean checkTable(EmptyTableDefinition tableDef)
Then check all columns and if a column does not exist, create that too.
tableDef
- table definitionpublic boolean tableExists(EmptyTableDefinition tableDef)
tableDef
- table definitionpublic boolean renameTable(java.lang.String oldName, java.lang.String newName)
oldName
- newName
- public boolean checkColumn(EmptyTableDefinition tableDef, PamTableItem tableItem)
tableDef
- table definitiontableItem
- table itempublic boolean columnExists(EmptyTableDefinition tableDef, PamTableItem tableItem)
tableDef
- table definitiontableItem
- table itempublic boolean changeColumnFormat(java.lang.String tableName, PamTableItem tableItem)
public boolean clearTable(EmptyTableDefinition tableDef)
tableDef
- tabledef identifying the table.public boolean clearTable(java.lang.String tableName)
public void updateProcessList()
public void newData(PamObservable o, PamDataUnit dataUnit)
newData
in class PamProcess
public void updateData(PamObservable o, PamDataUnit dataUnit)
updateData
in class PamProcess
public LogSettings getLogSettings()
public LogSettings getLogLastSettings()
public LogSettings getLogViewerSettings()