public class SimpleDatabaseManager extends DatabaseManager
backupSchemas, cacheConnectionByID, cacheConnectorByConnectionID, cacheConnectorByConnectorID, cacheConnectorDefByType, cacheEmbeddedByType, counterConnectorID, inspectedSchemas
Constructor and Description |
---|
SimpleDatabaseManager()
Constructor method for the manager.
|
Modifier and Type | Method and Description |
---|---|
boolean |
changePassword(java.lang.String type,
java.lang.String user,
java.lang.String password)
Changes the user password for the given embedded database.
|
boolean |
connect(DatabaseConnector connector,
boolean updatecheck)
Connects to the configured database.
|
java.sql.Connection |
createNewConnection(DatabaseConnector connector,
java.lang.String jdbcurl)
Lets the given connector create a new connection for the given JDBC URL.
|
DatabaseTabbedSession |
createNewSession(DatabaseConnection dbconn,
boolean connect)
Convenience method to create a new session.
|
boolean |
disconnect(DatabaseConnector connector)
Disconnects from the configured database.
|
boolean |
flushEmbedded(java.lang.String type)
Flushes the given embedded database.
|
boolean |
freezeEmbedded(java.lang.String type)
Freezes the given embedded database.
|
java.lang.String |
getDefaultConnectionURL(DatabaseConnector connector)
Provides the JDBC URL for the default connection (normally a user connection).
|
boolean |
isEmbeddedRunning(java.lang.String type)
Is the embedded database management system currently running?
|
boolean |
isSchemaNewer(java.lang.String versionID1,
java.lang.String versionID2)
Checks whether the first schema version identifier is newer than the second.
|
boolean |
reset(DatabaseConnector connector)
Resets the connector for the configured database.
|
boolean |
startEmbedded(java.lang.String type)
Starts the given embedded database.
|
boolean |
stopEmbedded(java.lang.String type)
Stops the given embedded database.
|
boolean |
unfreezeEmbedded(java.lang.String type)
Unfreezes the given embedded database.
|
boolean |
update(DatabaseConnector connector,
SchemaProps schemaprops)
Updates the database schema for the given connector.
|
addBackupSchema, addConnection, addConnectorDef, addEmbeddedHandler, addInspectedSchema, createNewConnector, createNextConnectorID, finalize, findConnectors, getAllConnections, getAllConnectorDefs, getAllConnectors, getAllEmbeddedHandlers, getBackupSchemas, getConnection, getConnection, getConnectionName, getConnections, getConnector, getConnectorDef, getConnectorID, getConnectors, getEmbeddedHandler, getFirstBestConnectedConnector, getInspectedSchemas, getUniqueConnectionID, getUsableConnectorDefs, hasConnectorDef, hasEmbeddedHandler, hasUsableConnectorDef, isEmbedded, printDebugConnections, removeAllConnections, removeAllConnectorDefs, removeConnection, removeConnection, removeConnector, removeConnectorDef, removeConnectorDef, removeEmbeddedHandler, updateConnections
public SimpleDatabaseManager()
public java.lang.String getDefaultConnectionURL(DatabaseConnector connector)
getDefaultConnectionURL
in class DatabaseManager
connector
- The connectornull
if an error occursjava.lang.NullPointerException
- If the parameters are null
public boolean connect(DatabaseConnector connector, boolean updatecheck)
connect
in class DatabaseManager
connector
- The connectorupdatecheck
- Update database if necessaryjava.lang.NullPointerException
- If the parameters are null
public boolean disconnect(DatabaseConnector connector)
disconnect
in class DatabaseManager
connector
- The connectorjava.lang.NullPointerException
- If the parameters are null
public boolean reset(DatabaseConnector connector)
reset
in class DatabaseManager
connector
- The connectorjava.lang.NullPointerException
- If the parameters are null
public java.sql.Connection createNewConnection(DatabaseConnector connector, java.lang.String jdbcurl)
createNewConnection
in class DatabaseManager
connector
- The connectorjdbcurl
- The JDBC URLnull
if an error occurredjava.lang.NullPointerException
- If the parameters are null
public boolean isSchemaNewer(java.lang.String versionID1, java.lang.String versionID2)
isSchemaNewer
in class DatabaseManager
versionID1
- The first version identifierversionID2
- The second version identifierjava.lang.NullPointerException
- If the parameters are null
public boolean update(DatabaseConnector connector, SchemaProps schemaprops)
update
in class DatabaseManager
connector
- The connector to use, should be already connectedschemaprops
- The schema propertiespublic boolean isEmbeddedRunning(java.lang.String type)
isEmbeddedRunning
in class DatabaseManager
type
- The connector class name in FQNpublic boolean startEmbedded(java.lang.String type)
startEmbedded
in class DatabaseManager
type
- The connector class name in FQNpublic boolean stopEmbedded(java.lang.String type)
stopEmbedded
in class DatabaseManager
type
- The connector class name in FQNpublic boolean flushEmbedded(java.lang.String type)
flushEmbedded
in class DatabaseManager
type
- The connector class name in FQNpublic boolean freezeEmbedded(java.lang.String type)
freezeEmbedded
in class DatabaseManager
type
- The connector class name in FQNpublic boolean unfreezeEmbedded(java.lang.String type)
unfreezeEmbedded
in class DatabaseManager
type
- The connector class name in FQNpublic boolean changePassword(java.lang.String type, java.lang.String user, java.lang.String password)
changePassword
in class DatabaseManager
type
- The connector class name in FQNuser
- The database userpassword
- The new passwordpublic DatabaseTabbedSession createNewSession(DatabaseConnection dbconn, boolean connect)
createNewSession
in class DatabaseManager
dbconn
- The connection to useconnect
- Connect to databasenull
Copyright © 2005-2013 Leisenfels UG (haftungsbeschränkt). All rights reserved.