Package generalDatabase
Class DBControlSettings
java.lang.Object
PamController.PamControlledUnit
generalDatabase.DBControl
generalDatabase.DBControlSettings
- All Implemented Interfaces:
PamSettings
,PamSettingsSource
,SettingsNameProvider
- Direct Known Subclasses:
ExternalDatabaseControl
Version of DBControl for loading settings at program startup.
- Author:
- Doug Gillespie
- See Also:
-
Field Summary
Fields inherited from class generalDatabase.DBControl
GlobalDatabaseNameArg
Fields inherited from class PamController.PamControlledUnit
isMixed, isViewer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionloadSettingsFromDB
(int showDatabaseDialog) Try to load the serialised settings from the database.loadSettingsFromDB
(PamConnection pamConnection) Load settings from the database using default run mode.loadSettingsFromDB
(PamConnection pamConnection, boolean viewer) Load settings from the datbase.loadSettingsFromDB
(PamControlledUnitSettings pamControlledUnitSettings) void
notifyModelChanged
(int changeType) General notification when the PAMGAURD model changes.Methods inherited from class generalDatabase.DBControl
addDatabaseSystem, browseDatabases, canClose, closeConnection, commitChanges, createFileMenu, createPamCursor, exportDatabaseSchema, fillSettingsStore, getConnection, getDatabaseName, getDatabaseSystem, getDatabaseSystems, getDbParameters, getDbProcess, getDbUnitType, getGUI, getLastErrorCount, getLoggingDataBlocks, getLongDatabaseName, getNumSettings, getSettings, getSettingsReference, getSettingsSourceName, getSettingsStore, getSettingsVersion, getSidePanel, getSystem, getSystem, isFullTablesCheck, openDatabase, pamClose, reOpenConnection, restoreSettings, saveEndSettings, saveSettingsToDB, saveStartSettings, selectDatabase, selectSystem, selectSystem, selectSystem, setDBParameters, setFullTablesCheck, setWriteCount
Methods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canPlayViewerSound, createDetectionMenu, createDisplayMenu, createHelpMenu, flushDataBlockBuffers, getBackupInformation, getFrameNumber, getGuiFrame, getInstanceIndex, getModuleStatus, getModuleStatusManager, getModuleSummary, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineState, getOfflineTaskGroup, getPamConfiguration, getPamController, getPamModuleInfo, getPamProcess, getPamView, getPlugin, getShortUnitType, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getToolbarComponent, getUnitName, getUnitTaskManager, getUnitTaskManager, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, setUnitTaskManager, setupControlledUnit, stopViewerSound, tellModule, terminalPrint, terminalPrintln, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface PamController.PamSettings
getUnitType
Methods inherited from interface PamController.SettingsNameProvider
getUnitName
-
Constructor Details
-
Method Details
-
loadSettingsFromDB
Load settings from the database using default run mode.- Parameters:
pamConnection
- connection- Returns:
- list of settings
-
loadSettingsFromDB
public ArrayList<PamControlledUnitSettings> loadSettingsFromDB(PamConnection pamConnection, boolean viewer) Load settings from the datbase.- Parameters:
pamConnection
- connectionviewer
- as for PAMGuard viewer. Slight bodge to support getting the right settings for the batch processor configurator.- Returns:
- list of settings
-
loadSettingsFromDB
public ArrayList<PamControlledUnitSettings> loadSettingsFromDB(PamControlledUnitSettings pamControlledUnitSettings) -
loadSettingsFromDB
Try to load the serialised settings from the database.First go for the last settings which are in a separate table, then if that's empty (which it will in many cases since the last settings table (Pamguard_Settings_Last) only appeared in February 2009), get the last entry in the cumulative settings stored in the Pamguard_Settings table.
- Parameters:
showDatabaseDialog
- Show a dialog to ask for a database. 0 = never, 1 = if no database open 2 = always.- Returns:
- Array list of PAMGUARD settings.
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from class:PamControlledUnit
General notification when the PAMGAURD model changes.- Overrides:
notifyModelChanged
in classDBControl
- Parameters:
changeType
- type of change
-