|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jdiagnose.DiagnosticUnit org.jdiagnose.library.BasicJdbcDiagnostic
Tests a JDBC connection using driver, url, username, password and test sql settings. See the JDiagnose-Library project for other Database Diagnostics.
Constructor Summary | |
BasicJdbcDiagnostic()
Default Constructor. |
|
BasicJdbcDiagnostic(java.lang.String name)
|
|
BasicJdbcDiagnostic(java.lang.String driver,
java.lang.String url,
java.lang.String username,
java.lang.String password,
java.lang.String sql)
Full constructor. |
|
BasicJdbcDiagnostic(java.lang.String name,
java.lang.String driver,
java.lang.String url,
java.lang.String username,
java.lang.String password,
java.lang.String sql)
Full constructor. |
Method Summary | |
void |
diagnoseSql()
Try to connect to the JDBC url using the driver, username and password settings. |
java.lang.String |
getDriver()
|
java.lang.String |
getPassword()
|
java.lang.String |
getSql()
|
java.lang.String |
getUrl()
|
java.lang.String |
getUsername()
|
void |
setDriver(java.lang.String driver)
|
void |
setPassword(java.lang.String password)
|
void |
setSql(java.lang.String sql)
|
void |
setUrl(java.lang.String url)
|
void |
setUsername(java.lang.String username)
|
Methods inherited from class org.jdiagnose.DiagnosticUnit |
assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertTrue, assertTrue, diagnose, getDiagnosticContainers, getDiagnostics, getName, setUp, tearDown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BasicJdbcDiagnostic(java.lang.String name, java.lang.String driver, java.lang.String url, java.lang.String username, java.lang.String password, java.lang.String sql)
name
- the name of this diagnosticdriver
- jdbc driver to useurl
- jdbc urlusername
- jdbc usernamepassword
- jdbc passwordsql
- sql to use to test the connectionpublic BasicJdbcDiagnostic(java.lang.String driver, java.lang.String url, java.lang.String username, java.lang.String password, java.lang.String sql)
driver
- url
- username
- password
- sql
- public BasicJdbcDiagnostic()
public BasicJdbcDiagnostic(java.lang.String name)
Method Detail |
public void diagnoseSql() throws java.sql.SQLException, java.lang.ClassNotFoundException
java.sql.SQLException
java.lang.ClassNotFoundException
public java.lang.String getDriver()
public void setDriver(java.lang.String driver)
driver
- The driver to set.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- The password to set.public java.lang.String getSql()
public void setSql(java.lang.String sql)
sql
- The sql to set.public java.lang.String getUrl()
public void setUrl(java.lang.String url)
url
- The url to set.public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- The username to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |