|
||||||||||
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.MySQLDatabase
public final class MySQLDatabase
A Database implementation based on the MySQL 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 | |
---|---|
MySQLDatabase()
Instantiates a new MySQLDatabase. |
|
MySQLDatabase(String host,
String port,
String dbname)
Instantiates a new MySQLDatabase. |
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 |
boolean |
supportsNowait()
Returns true if the dbms supports the select for update NOWAIT option |
Methods inherited from class org.jminor.common.db.AbstractDatabase |
---|
addConnectionProperties, createConnection, getAuthenticationInfo, getCheckConnectionQuery, getDatabaseType, getErrorMessage, getHost, getLoginTimeout, getPort, getSequenceSQL, getSid, isEmbedded, shutdownEmbedded, supportsIsValid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MySQLDatabase()
public MySQLDatabase(String host, String port, String dbname)
host
- the host nameport
- the port numberdbname
- the db nameMethod 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 boolean supportsNowait()
supportsNowait
in interface Database
supportsNowait
in class AbstractDatabase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |