Package generalDatabase
Class MSAccessSystem
java.lang.Object
generalDatabase.DBSystem
generalDatabase.BaseAccessSystem
generalDatabase.MSAccessSystem
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbrowseDatabases
(Component parent) browseDatabasesFX
(int type) Browse for databases using an FX dialog.boolean
boolean
find out if it's possible to open the current databse with a host application (e.g.void
closeConnection
(PamConnection connection) Close the database connectionboolean
create()
Create a new databasecreatePamCursor
(EmptyTableDefinition tableDefinition) boolean
exists()
static PamConnection
getACCDBConnection
(DBSystem dbSystem, String dbName) getConnection
(String dbName) Open new database connection with a specific nameGet the FX pane for the database systemgetDialogPanel
(Component parent) Get a database specific dialog panel to include in the database select dialog.Get a list of keywords which potentially may not be used for column names in an SQL statement.static PamConnection
getMDBConnection
(DBSystem dbSystem, String dbName) long
Get a shorter version of the currently open database name (e.g.Get the SQLTypes object which can be used to preform system specific formatting of SQL strings.boolean
boolean
Open the database with it's host application if available (e.g.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) Methods inherited from class generalDatabase.DBSystem
checkDatabaseExists, checkDatabaseExists, getConnection
-
Field Details
-
SYSTEMNAME
- See Also:
-
-
Constructor Details
-
MSAccessSystem
-
-
Method Details
-
getRecentDatabases
- Specified by:
getRecentDatabases
in classBaseAccessSystem
- Returns:
- the recentDatabases
-
browseDatabases
- Specified by:
browseDatabases
in classDBSystem
-
canCreate
public boolean canCreate() -
create
public boolean create()Description copied from class:DBSystem
Create a new databaseThe underlying DBSystem will be responsible for any dialogs to chose database names, etc.
-
createPamCursor
- Specified by:
createPamCursor
in classDBSystem
-
exists
public boolean exists() -
getConnection
Description copied from class:DBSystem
Open new database connection with a specific name- Specified by:
getConnection
in classDBSystem
- Returns:
-
getMDBConnection
- Throws:
Exception
-
getACCDBConnection
- Throws:
Exception
-
closeConnection
Description copied from class:DBSystem
Close the database connection- Overrides:
closeConnection
in classDBSystem
-
hasDriver
public boolean hasDriver() -
getDatabaseName
- Specified by:
getDatabaseName
in classDBSystem
- Returns:
- the name of the currently open database.
-
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 classDBSystem
- Returns:
- a shorter name
-
getDialogPanel
Description copied from class:DBSystem
Get a database specific dialog panel to include in the database select dialog.- Specified by:
getDialogPanel
in classDBSystem
- Parameters:
parent
- parent component- Returns:
- dialog panel
-
getSqlTypes
Description copied from class:DBSystem
Get the SQLTypes object which can be used to preform system specific formatting of SQL strings.- Specified by:
getSqlTypes
in classDBSystem
- Returns:
-
getSystemName
- Specified by:
getSystemName
in classDBSystem
- Returns:
- The name of the database system
-
getUnitName
- Specified by:
getUnitName
in interfaceSettingsNameProvider
- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitType
in interfacePamSettings
- Returns:
- A Name specific to the type, e.g. Click detector
-
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- 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
-
getKeywords
Description copied from class:DBSystem
Get a list of keywords which potentially may not be used for column names in an SQL statement. In reality, this list is complete overkill. Override for each system and try to reduce the list as much as possible.- Overrides:
getKeywords
in classDBSystem
- Returns:
- list of restricted keywords.
-
canOpenDatabase
public boolean canOpenDatabase()Description copied from class:DBSystem
find out if it's possible to open the current databse with a host application (e.g. MS Access).- Overrides:
canOpenDatabase
in classDBSystem
- Returns:
- true if it's possible.
-
openCurrentDatabase
public boolean openCurrentDatabase()Description copied from class:DBSystem
Open the database with it's host application if available (e.g. open MS access database with Access).- Overrides:
openCurrentDatabase
in classDBSystem
- Returns:
- true if opened sucessfully.
-
getDialogPaneFX
Description copied from class:DBSystem
Get the FX pane for the database system- Specified by:
getDialogPaneFX
in classDBSystem
- Returns:
- the FX settings pane for the database system.
-
browseDatabasesFX
Description copied from class:DBSystem
Browse for databases using an FX dialog.- Specified by:
browseDatabasesFX
in classDBSystem
- Returns:
-