generalDatabase
Class MySQLSystem
java.lang.Object
generalDatabase.DBSystem
generalDatabase.MySQLSystem
- All Implemented Interfaces:
- PamSettings
public class MySQLSystem
- extends DBSystem
- implements PamSettings
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mySQLDialogPanel
private MySQLDialogPanel mySQLDialogPanel
mySQLParameters
protected MySQLParameters mySQLParameters
serverConnection
java.sql.Connection serverConnection
schemaName
final java.lang.String schemaName
- See Also:
- Constant Field Values
sqlTypes
SQLTypes sqlTypes
openDatabase
private java.lang.String openDatabase
availableDatabases
private java.util.ArrayList<java.lang.String> availableDatabases
MySQLSystem
public MySQLSystem(DBControl dbControl,
int settingsStore)
browseDatabases
java.lang.String browseDatabases(java.awt.Component parent)
- Specified by:
browseDatabases 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
getDialogPanel
public SystemDialogPanel getDialogPanel(java.awt.Component parent)
- Specified by:
getDialogPanel in class DBSystem
serverConnect
boolean serverConnect(MySQLParameters params)
serverConnect
boolean serverConnect(java.lang.String ipAddress,
int portNumber,
java.lang.String userName,
java.lang.String userPassword)
createNewDatabase
boolean createNewDatabase(java.lang.String name)
getAvailableDatabases
java.util.ArrayList<java.lang.String> getAvailableDatabases(boolean doUpdate)
buildDatabaseUrl
public java.lang.String buildDatabaseUrl(java.lang.String ipAddress,
int portNumber,
java.lang.String databaseName)
serverDisconnect
void serverDisconnect()
isServerConnected
public boolean isServerConnected()
getDatabaseName
java.lang.String getDatabaseName()
- Specified by:
getDatabaseName in class DBSystem
- Returns:
- the name of the currently open database.
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
createPamCursor
public PamCursor createPamCursor(EmptyTableDefinition tableDefinition)
- Specified by:
createPamCursor in class DBSystem
getSqlTypes
SQLTypes getSqlTypes()
- Specified by:
getSqlTypes in class DBSystem