Package generalDatabase
Class ServerBasedSystem
java.lang.Object
generalDatabase.DBSystem
generalDatabase.ServerBasedSystem
- All Implemented Interfaces:
PamSettings,SettingsNameProvider
- Direct Known Subclasses:
MySQLSystem,PostgreSQLSystem
-
Field Summary
FieldsFields inherited from class generalDatabase.DBSystem
keywords2003 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbrowseDatabases(Component parent) browseDatabasesFX(int type) Browse for databases using an FX dialog.abstract StringbuildDatabaseUrl(String ipAddress, int portNumber, String databaseName) booleanabstract StringbooleancheckDatabaseExists(String dbName) booleancreate()Create a new databasebooleancreateNewDatabase(String name) createPamCursor(EmptyTableDefinition tableDefinition) booleanexists()abstract StringgetConnection(String databaseName) Open new database connection with a specific nameabstract intabstract StringGet the FX pane for the database systemgetDialogPanel(Component parent) Get a database specific dialog panel to include in the database select dialog.abstract Stringabstract StringGet the database schema name - the name of the databse on the server which manages the other databaseslongabstract Stringbooleanbooleanprotected MySQLParametersMake default parameters for this systembooleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) Methods inherited from class generalDatabase.DBSystem
canOpenDatabase, checkDatabaseExists, closeConnection, getConnection, getKeywords, getShortDatabaseName, getSqlTypes, openCurrentDatabase, reOpenConnectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PamController.PamSettings
getUnitType
-
Field Details
-
mySQLParameters
-
-
Constructor Details
-
ServerBasedSystem
-
-
Method Details
-
makeDefaultParams
Make default parameters for this system- Returns:
- default prameters (particularly username and port)
-
browseDatabases
- Specified by:
browseDatabasesin classDBSystem
-
canCreate
public boolean canCreate() -
create
public boolean create()Description copied from class:DBSystemCreate a new databaseThe underlying DBSystem will be responsible for any dialogs to chose database names, etc.
-
exists
public boolean exists() -
getDriverClassName
-
getDefaultUser
-
getConnection
Description copied from class:DBSystemOpen new database connection with a specific name- Specified by:
getConnectionin classDBSystem- Parameters:
databaseName-- Returns:
-
getSystemName
- Specified by:
getSystemNamein classDBSystem- Returns:
- The name of the database system
-
hasDriver
public boolean hasDriver() -
getDialogPanel
Description copied from class:DBSystemGet a database specific dialog panel to include in the database select dialog.- Specified by:
getDialogPanelin classDBSystem- Parameters:
parent- parent component- Returns:
- dialog panel
-
getDefaultPort
public abstract int getDefaultPort() -
getSchemaName
Get the database schema name - the name of the databse on the server which manages the other databases- Returns:
-
createNewDatabase
- Specified by:
createNewDatabasein classDBSystem
-
getAvailableDatabaseString
-
checkAvailableDatabaseResult
-
buildDatabaseUrl
-
isServerConnected
public boolean isServerConnected() -
getDatabaseName
- Specified by:
getDatabaseNamein classDBSystem- Returns:
- the name of the currently open database.
-
getSettingsReference
- Specified by:
getSettingsReferencein interfacePamSettings- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersionin interfacePamSettings- Returns:
- An integer version number for the settings
-
getUnitName
- Specified by:
getUnitNamein interfaceSettingsNameProvider- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
restoreSettings
- Specified by:
restoreSettingsin interfacePamSettings- Parameters:
pamControlledUnitSettings-- 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
-
createPamCursor
- Specified by:
createPamCursorin classDBSystem
-
getDialogPaneFX
Description copied from class:DBSystemGet the FX pane for the database system- Specified by:
getDialogPaneFXin classDBSystem- Returns:
- the FX settings pane for the database system.
-
browseDatabasesFX
Description copied from class:DBSystemBrowse for databases using an FX dialog.- Specified by:
browseDatabasesFXin classDBSystem- Parameters:
type-- Returns:
-
checkDatabaseExists
- Overrides:
checkDatabaseExistsin classDBSystem
-