|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jminor.common.db.AbstractDatabase
org.jminor.common.db.dbms.DerbyDatabase
public final class DerbyDatabase
A Database implementation based on the Derby database.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jminor.common.db.Database |
---|
Database.Statistics |
Field Summary |
---|
Fields inherited from interface org.jminor.common.db.Database |
---|
DATABASE_EMBEDDED, DATABASE_HOST, DATABASE_IMPLEMENTATION_CLASS, DATABASE_POOL_STATISTICS, DATABASE_PORT, DATABASE_SID, DATABASE_TYPE, DEFAULT_LOGIN_TIMEOUT, DERBY, H2, HSQL, MYSQL, ORACLE, PASSWORD_PROPERTY, POSTGRESQL, SQLSERVER, USER_PROPERTY |
Constructor Summary | |
---|---|
DerbyDatabase()
Instantiates a new DerbyDatabase. |
|
DerbyDatabase(String databaseName)
Instantiates a new embedded DerbyDatabase. |
|
DerbyDatabase(String host,
String port,
String sid)
Instantiates a new networked DerbyDatabase. |
Method Summary | |
---|---|
String |
getAutoIncrementValueSQL(String idSource)
Returns a query string for retrieving the last automatically generated id from the given id source |
String |
getURL(Properties connectionProperties)
|
void |
loadDriver()
Loads the database driver |
void |
shutdownEmbedded(Properties connectionProperties)
This should shutdown the database in case it is an embedded one and if that is applicable, such as for Derby. |
Methods inherited from class org.jminor.common.db.AbstractDatabase |
---|
addConnectionProperties, createConnection, getAuthenticationInfo, getCheckConnectionQuery, getDatabaseType, getErrorMessage, getHost, getLoginTimeout, getPort, getSequenceSQL, getSid, isEmbedded, supportsIsValid, supportsNowait |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DerbyDatabase()
public DerbyDatabase(String databaseName)
databaseName
- the path to the database filespublic DerbyDatabase(String host, String port, String sid)
host
- the host nameport
- the port numbersid
- the service identifierMethod Detail |
---|
public void loadDriver() throws ClassNotFoundException
ClassNotFoundException
- in case the driver class in not foundpublic String getAutoIncrementValueSQL(String idSource)
idSource
- the source for the id, for example a sequence name or in the case of Derby, the name of the table
public String getURL(Properties connectionProperties)
connectionProperties
- the connection properties, used primarily to provide
embedded databases with user info for authentication purposes
public void shutdownEmbedded(Properties connectionProperties)
shutdownEmbedded
in interface Database
shutdownEmbedded
in class AbstractDatabase
connectionProperties
- the connection properties
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |