Package generalDatabase.ucanAccess
Class UCanAccessSystem
java.lang.Object
generalDatabase.DBSystem
generalDatabase.BaseAccessSystem
generalDatabase.ucanAccess.UCanAccessSystem
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
-
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.boolean
create()
Create a new databasecreatePamCursor
(EmptyTableDefinition tableDefinition) boolean
exists()
getConnection
(String latest) 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.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, closeConnection, getConnection, getKeywords
-
Constructor Details
-
UCanAccessSystem
-
-
Method Details
-
getRecentDatabases
- Specified by:
getRecentDatabases
in classBaseAccessSystem
- Returns:
- the recentDatabases
-
getSystemName
- Specified by:
getSystemName
in classDBSystem
- Returns:
- The name of the database system
-
browseDatabases
- Specified by:
browseDatabases
in classDBSystem
-
canCreate
public boolean canCreate() -
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
-
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:
-
exists
public boolean exists() -
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.
-
getConnection
Description copied from class:DBSystem
Open new database connection with a specific name- Specified by:
getConnection
in classDBSystem
- Returns:
-
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
-
createPamCursor
- Specified by:
createPamCursor
in classDBSystem
-
hasDriver
public boolean hasDriver() -
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
-
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:
-