org.w3c.tools.jdbc
Class JdbcBean

java.lang.Object
  |
  +--org.w3c.tools.jdbc.JdbcBean

public class JdbcBean
extends java.lang.Object


Field Summary
protected  boolean debug
           
protected  java.lang.String driver
           
protected  java.lang.String password
           
protected  java.util.Properties props
           
protected  java.lang.String result
           
protected  java.lang.String sqlrequest
           
protected  java.sql.ResultSet sqlresult
           
protected  java.lang.String url
           
protected  java.lang.String username
           
 
Constructor Summary
JdbcBean()
          Constructor
 
Method Summary
 void executeSQL()
          Send the SQL Request to the DB.
 void executeSQL(java.lang.String sqlrequest)
          Send the given SQL Request to the DB.
 boolean getDebug()
          Get the debug flag
 java.lang.String getDriver()
          Get the JDBC driver
 int getMaxconn()
          Get the max number of open connections to the DB
 java.lang.String getPassword()
          Get the password property
 java.sql.ResultSet getResult()
          Warning: can be null!
 java.lang.String getSqlrequest()
          Get the SQL request property
 java.lang.String getUrl()
          Get the JDBC URI property
 java.lang.String getUsername()
          Get the username property
 void setDebug(boolean debug)
          Set the debug flag
 void setDriver(java.lang.String driver)
          Set the JDBC driver
 void setMaxconn(int maxconn)
          Set the max number of open connections to the DB
 void setPassword(java.lang.String password)
          Set the password property
 void setSqlrequest(java.lang.String sqlrequest)
          Set the SQL request property
 void setUrl(java.lang.String url)
          Set the JDBC URI property
 void setUsername(java.lang.String username)
          Set the username property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

props

protected java.util.Properties props

sqlresult

protected java.sql.ResultSet sqlresult

debug

protected boolean debug

driver

protected java.lang.String driver

username

protected java.lang.String username

password

protected java.lang.String password

url

protected java.lang.String url

sqlrequest

protected java.lang.String sqlrequest

result

protected java.lang.String result
Constructor Detail

JdbcBean

public JdbcBean()
Constructor
Method Detail

setDebug

public void setDebug(boolean debug)
Set the debug flag
Parameters:
debug - a boolean

getDebug

public boolean getDebug()
Get the debug flag
Returns:
a boolean

setDriver

public void setDriver(java.lang.String driver)
Set the JDBC driver
Parameters:
driver - the jdbc driver

getDriver

public java.lang.String getDriver()
Get the JDBC driver
Returns:
a String instance

setUsername

public void setUsername(java.lang.String username)
Set the username property
Parameters:
username -  

getUsername

public java.lang.String getUsername()
Get the username property
Returns:
a String instance

setPassword

public void setPassword(java.lang.String password)
Set the password property
Parameters:
password -  

getPassword

public java.lang.String getPassword()
Get the password property
Returns:
a String

setUrl

public void setUrl(java.lang.String url)
Set the JDBC URI property
Parameters:
url -  

getUrl

public java.lang.String getUrl()
Get the JDBC URI property
Returns:
a String

setSqlrequest

public void setSqlrequest(java.lang.String sqlrequest)
Set the SQL request property
Parameters:
sqlrequest -  

getSqlrequest

public java.lang.String getSqlrequest()
Get the SQL request property
Returns:
a String

setMaxconn

public void setMaxconn(int maxconn)
Set the max number of open connections to the DB
Parameters:
maxconn -  

getMaxconn

public int getMaxconn()
Get the max number of open connections to the DB
Returns:
an int

executeSQL

public void executeSQL()
Send the SQL Request to the DB.
Parameters:
nocache - we don't use the cache if true

executeSQL

public void executeSQL(java.lang.String sqlrequest)
Send the given SQL Request to the DB.
Parameters:
sqlresult - the SQL Request
nocache - we don't use the cache if true

getResult

public java.sql.ResultSet getResult()
Warning: can be null!
Returns:
a ResultSet instance or null.