public class DriverDatabase extends AbstractDatabase<java.sql.Driver> implements InactiveDriverDatabaseMBean
Constructor and Description |
---|
DriverDatabase() |
Modifier and Type | Method and Description |
---|---|
java.sql.Connection |
connect(java.sql.Driver driver)
Connects to the database using the specified connection factory.
|
java.sql.Driver |
createConnectionFactory()
Factory method for creating a connection factory object for this database.
|
javax.management.DynamicMBean |
getActiveMBean() |
java.lang.String |
getDriver()
Returns the driver class name for this database.
|
javax.management.DynamicMBean |
getInactiveMBean() |
java.lang.String |
getUrl()
Returns the url for this database
|
void |
setDriver(java.lang.String driver)
Set the driver class for this database.
|
void |
setUrl(java.lang.String url)
Set the url for this database
|
checkDirty, clean, compareTo, equals, getId, getPassword, getProperties, getUser, getWeight, hashCode, isDirty, isLocal, removeProperty, setId, setLocal, setPassword, setProperties, setProperty, setUser, setWeight, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
removeProperty, setLocal, setPassword, setProperty, setUser, setWeight
getId, getPassword, getProperties, getUser, getWeight, isLocal
public DriverDatabase()
public java.lang.String getUrl()
ActiveDriverDatabaseMBean
getUrl
in interface ActiveDriverDatabaseMBean
ActiveDriverDatabaseMBean.getUrl()
public void setUrl(java.lang.String url)
InactiveDriverDatabaseMBean
setUrl
in interface InactiveDriverDatabaseMBean
url
- a database urlInactiveDriverDatabaseMBean.setUrl(java.lang.String)
public java.lang.String getDriver()
ActiveDriverDatabaseMBean
getDriver
in interface ActiveDriverDatabaseMBean
ActiveDriverDatabaseMBean.getDriver()
public void setDriver(java.lang.String driver)
InactiveDriverDatabaseMBean
setDriver
in interface InactiveDriverDatabaseMBean
driver
- the driver class nameInactiveDriverDatabaseMBean.setDriver(java.lang.String)
public java.sql.Connection connect(java.sql.Driver driver) throws java.sql.SQLException
Database
connect
in interface Database<java.sql.Driver>
driver
- a factory object for creating connectionsjava.sql.SQLException
- if connection failsDatabase.connect(java.lang.Object)
public java.sql.Driver createConnectionFactory()
Database
createConnectionFactory
in interface Database<java.sql.Driver>
Database.createConnectionFactory()
public javax.management.DynamicMBean getActiveMBean()
getActiveMBean
in interface Database<java.sql.Driver>
Database.getActiveMBean()
public javax.management.DynamicMBean getInactiveMBean()
getInactiveMBean
in interface Database<java.sql.Driver>
Database.getInactiveMBean()