|
Oracle Application Server Containers for J2EE Support for JavaServer Pages API Reference 10g (9.0.4) B10387-01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--oracle.jsp.dbutil.DBBean
A very simple bean that provides access to the database and execute queries (only, not DML or DDL).
Bean Properties that can be set and retrieved :
| Constructor Summary | |
DBBean()Default Constructor | |
| Method Summary | |
void |
close()Close the database connection and any opened cursors. |
void |
connect()Establish a database connection with the given user name, password and URL. |
java.lang.String |
getPassword()Get the password for this data access bean. |
java.lang.String |
getResultAsHTMLTable(java.lang.String sql)Execute the Sql and return the result as a HTM Table. |
java.lang.String |
getResultAsXMLString(java.lang.String sql)Execute the Sql and return the result as a XML String |
java.lang.String |
getURL()Get the URL of the datasource to which connections are made. |
java.lang.String |
getUser()Get the user name for this data access bean. |
void |
outOfScope(JspScopeEvent ae)Invoked when a JSP scope that this object is attached to is ending. |
void |
setPassword(java.lang.String password)Set the password with which connections have to be obtained. |
void |
setURL(java.lang.String url)Set the URL of the datasource to which connection have to be obtained. |
void |
setUser(java.lang.String user)Set the user name with which connections have to be obtained. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DBBean()
| Method Detail |
public void setUser(java.lang.String user)
user - Username to be set.public java.lang.String getUser()
public void setPassword(java.lang.String password)
password - Passoword to be set.public java.lang.String getPassword()
public void setURL(java.lang.String url)
url - URL to be set.public java.lang.String getURL()
public void connect()
throws java.sql.SQLException
java.sql.SQLException - if a database-access error occurs.
public void close()
throws java.sql.SQLException
java.sql.SQLException - if a database-access error occurs.
public java.lang.String getResultAsXMLString(java.lang.String sql)
throws java.sql.SQLException
sql - Sql String to be executedjava.sql.SQLException - if cursor execution fails.
public java.lang.String getResultAsHTMLTable(java.lang.String sql)
throws java.sql.SQLException
sql - Sql String to be executedjava.sql.SQLException - if cursor execution fails.public void outOfScope(JspScopeEvent ae)
JspScopeListeneroutOfScope in interface JspScopeListener
|
Oracle Application Server Containers for J2EE Support for JavaServer Pages API Reference 10g (9.0.4) B10387-01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||