generalDatabase
Class MSAccessSystem

java.lang.Object
  extended by generalDatabase.DBSystem
      extended by generalDatabase.MSAccessSystem
All Implemented Interfaces:
PamSettings

public class MSAccessSystem
extends DBSystem
implements PamSettings


Field Summary
(package private)  DBControl dbControl
           
(package private)  MSAccessDialogPanel dialogPanel
           
(package private)  java.util.ArrayList<java.io.File> recentDatabases
           
(package private)  SQLTypes sqlTypes
           
static java.lang.String SYSTEMNAME
           
 
Fields inherited from class generalDatabase.DBSystem
connection
 
Constructor Summary
MSAccessSystem(DBControl dbControl, int settingsStore)
           
 
Method Summary
(package private)  java.lang.String browseDatabases(java.awt.Component parent)
           
(package private)  boolean canCreate()
           
(package private)  boolean create()
          Create a new database
 PamCursor createPamCursor(EmptyTableDefinition tableDefinition)
           
(package private)  boolean exists()
           
(package private)  java.sql.Connection getConnection()
          Open a new database connection
 java.lang.String getDatabaseName()
           
 SystemDialogPanel getDialogPanel(java.awt.Component parent)
           
 java.io.Serializable getSettingsReference()
           
 long getSettingsVersion()
           
 java.lang.String getShortDatabaseName()
          Get a shorter version of the currently open database name (e.g.
(package private)  SQLTypes getSqlTypes()
           
(package private)  java.lang.String getSystemName()
           
 java.lang.String getUnitName()
           
 java.lang.String getUnitType()
           
 boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
           
 
Methods inherited from class generalDatabase.DBSystem
closeConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

recentDatabases

java.util.ArrayList<java.io.File> recentDatabases

dbControl

DBControl dbControl

dialogPanel

MSAccessDialogPanel dialogPanel

sqlTypes

SQLTypes sqlTypes

SYSTEMNAME

public static final java.lang.String SYSTEMNAME
See Also:
Constant Field Values
Constructor Detail

MSAccessSystem

public MSAccessSystem(DBControl dbControl,
                      int settingsStore)
Method Detail

getDialogPanel

public SystemDialogPanel getDialogPanel(java.awt.Component parent)
Specified by:
getDialogPanel in class DBSystem

canCreate

boolean canCreate()
Specified by:
canCreate in class DBSystem
Returns:
true if the system can create new databases.

create

boolean create()
Description copied from class: DBSystem
Create a new database

The underlying DBSystem will be responsible for any dialogs to chose database names, etc.

Specified by:
create in class DBSystem
Returns:
true if successful.

exists

boolean exists()
Specified by:
exists in class DBSystem

getConnection

java.sql.Connection getConnection()
Description copied from class: DBSystem
Open a new database connection

Specified by:
getConnection in class DBSystem

getSystemName

java.lang.String getSystemName()
Specified by:
getSystemName in class DBSystem
Returns:
The name of the database system

browseDatabases

java.lang.String browseDatabases(java.awt.Component parent)
Specified by:
browseDatabases in class DBSystem

getSettingsReference

public java.io.Serializable getSettingsReference()
Specified by:
getSettingsReference in interface PamSettings
Returns:
The serialisable object that will be stored

getSettingsVersion

public long getSettingsVersion()
Specified by:
getSettingsVersion in interface PamSettings
Returns:
An integer version number for the settings

getUnitName

public java.lang.String getUnitName()
Specified by:
getUnitName in interface PamSettings
Returns:
A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.

getUnitType

public java.lang.String getUnitType()
Specified by:
getUnitType in interface PamSettings
Returns:
A Name specific to the type, e.g. Glick detector

restoreSettings

public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
Specified by:
restoreSettings in interface PamSettings
Returns:
true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required

getDatabaseName

public java.lang.String getDatabaseName()
Specified by:
getDatabaseName in class DBSystem
Returns:
the name of the currently open database.

getShortDatabaseName

public java.lang.String getShortDatabaseName()
Description copied from class: DBSystem
Get a shorter version of the currently open database name (e.g. without the file path name)

Overrides:
getShortDatabaseName in class DBSystem
Returns:
a shorter name

getSqlTypes

SQLTypes getSqlTypes()
Specified by:
getSqlTypes in class DBSystem

createPamCursor

public PamCursor createPamCursor(EmptyTableDefinition tableDefinition)
Specified by:
createPamCursor in class DBSystem