|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPamController.PamControlledUnit
generalDatabase.DBControl
public abstract class DBControl
Database system for accessing data in just about any type of odbc database.
This gets used in two slightly different ways in Pamguard. The first is the obvious reading and writing of data to a variety of tables. The second is the loading of settings from the PAmguard_settings and the PamguardModules tables tables in which all program settings were serialised and stored as 6 bit ascii strings each time PAMGUARD started collecting data.
So that an instance of DBControl can be made that doesn't load settings, two sub classes have been made: DBContorlUnit for normal use and DBControlSettings for reading in settings information.
DBControlSettings,
DBControlUnit| Nested Class Summary | |
|---|---|
(package private) class |
DBControl.DatabaseFileMenuAction
|
| Field Summary | |
|---|---|
private java.sql.Connection |
connection
|
(package private) DBSystem |
databaseSystem
|
(package private) java.util.ArrayList<DBSystem> |
databaseSystems
|
(package private) DBParameters |
dbParameters
|
private DBProcess |
dbProcess
|
private DBSettingsStore |
dbSettingsStore
|
(package private) DBSidePanel |
dbSidePanel
|
private static java.lang.String |
dbUnitType
|
private boolean |
fullTablesCheck
Do full check of all database tables, not just specieals for controller. |
private DBControl |
THIS
|
| Fields inherited from class PamController.PamControlledUnit |
|---|
isViewer |
| Constructor Summary | |
|---|---|
DBControl(java.lang.String unitName,
int settingsStore)
|
|
| Method Summary | |
|---|---|
java.lang.String |
browseDatabases(java.awt.Component parent)
|
private void |
closeConnection()
|
(package private) void |
createDBControl(int settingsStore)
|
javax.swing.JMenuItem |
createFileMenu(javax.swing.JFrame parentFrame)
|
PamCursor |
createPamCursor(EmptyTableDefinition tableDefinition)
|
private void |
fillSettingsStore()
Read all the settings in from storage. |
java.sql.Connection |
getConnection()
|
java.lang.String |
getDatabaseName()
|
DBProcess |
getDbProcess()
|
static java.lang.String |
getDbUnitType()
|
protected java.util.ArrayList<PamDataBlock> |
getLoggingDataBlocks()
|
int |
getNumSettings()
Get the number of different settings within the settings source. |
PamSettingsGroup |
getSettings(int settingsIndex)
Get a specific PamSettingsGroup |
java.io.Serializable |
getSettingsReference()
|
java.lang.String |
getSettingsSourceName()
Get a name for the settings source |
long |
getSettingsVersion()
|
PamSidePanel |
getSidePanel()
Gets a reference to a small panel to be displayed along the left hand edge of the main tab panel. |
(package private) DBSystem |
getSystem(int systemNumber)
|
boolean |
isFullTablesCheck()
|
void |
notifyModelChanged(int changeType)
General notification when the PAMGAURD model changes. |
boolean |
restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
|
boolean |
saveSettingsToDB()
|
boolean |
saveStartSettings(long timeNow)
Save the settings in some way or another. |
protected boolean |
selectDatabase(java.awt.Frame frame)
|
boolean |
selectSystem(int systemNumber,
boolean openDatabase)
|
void |
setFullTablesCheck(boolean fullTablesCheck)
|
protected void |
setWriteCount(int dbWriteOKs,
int dbWriteErrors)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface PamController.PamSettings |
|---|
getUnitName, getUnitType |
| Field Detail |
|---|
java.util.ArrayList<DBSystem> databaseSystems
DBSystem databaseSystem
private java.sql.Connection connection
DBParameters dbParameters
private DBProcess dbProcess
DBSidePanel dbSidePanel
private DBSettingsStore dbSettingsStore
private boolean fullTablesCheck
private static java.lang.String dbUnitType
private DBControl THIS
| Constructor Detail |
|---|
public DBControl(java.lang.String unitName,
int settingsStore)
| Method Detail |
|---|
void createDBControl(int settingsStore)
public boolean selectSystem(int systemNumber,
boolean openDatabase)
DBSystem getSystem(int systemNumber)
private void closeConnection()
public java.lang.String browseDatabases(java.awt.Component parent)
public void notifyModelChanged(int changeType)
PamControlledUnit
notifyModelChanged in class PamControlledUnitchangeType - type of changeprivate void fillSettingsStore()
public java.sql.Connection getConnection()
public java.io.Serializable getSettingsReference()
getSettingsReference in interface PamSettingspublic long getSettingsVersion()
getSettingsVersion in interface PamSettingspublic boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
restoreSettings in interface PamSettingspublic javax.swing.JMenuItem createFileMenu(javax.swing.JFrame parentFrame)
createFileMenu in class PamControlledUnitparentFrame - parent frame for the menu
protected void setWriteCount(int dbWriteOKs,
int dbWriteErrors)
protected boolean selectDatabase(java.awt.Frame frame)
public PamSidePanel getSidePanel()
PamControlledUnitIt is possible for a PamControlled unit to have a side panel without having a pamTabPanel.
getSidePanel in class PamControlledUnitPamSidePanel,
PamTabPanelpublic static java.lang.String getDbUnitType()
public DBProcess getDbProcess()
public boolean saveSettingsToDB()
public boolean saveStartSettings(long timeNow)
PamSettingsSource
saveStartSettings in interface PamSettingsSourcetimeNow - current time.
public int getNumSettings()
PamSettingsSource
getNumSettings in interface PamSettingsSourcepublic PamSettingsGroup getSettings(int settingsIndex)
PamSettingsSource
getSettings in interface PamSettingsSourcesettingsIndex - index of group
public java.lang.String getSettingsSourceName()
PamSettingsSource
getSettingsSourceName in interface PamSettingsSourcepublic boolean isFullTablesCheck()
public void setFullTablesCheck(boolean fullTablesCheck)
protected java.util.ArrayList<PamDataBlock> getLoggingDataBlocks()
public java.lang.String getDatabaseName()
public PamCursor createPamCursor(EmptyTableDefinition tableDefinition)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||