org.apache.empire.db
Class DBDatabase

java.lang.Object
  extended by org.apache.empire.commons.ErrorObject
      extended by org.apache.empire.db.DBObject
          extended by org.apache.empire.db.DBDatabase
All Implemented Interfaces:
java.io.Serializable, ErrorInfo
Direct Known Subclasses:
OracleSYSDatabase

public abstract class DBDatabase
extends DBObject

This abstract class is the applicaton's interface for a particular database schema.

It provides access to the various database objects such als tables, views and relations.

It also provides methods to execute DQL and DML SQL-commands.

See Also:
Serialized Form

Nested Class Summary
static class DBDatabase.DBSystemDate
          This class represents the database systems current date and time.
 
Nested classes/interfaces inherited from class org.apache.empire.commons.ErrorObject
ErrorObject.ObjectErrorInfo
 
Field Summary
protected  DBDatabaseDriver driver
           
static java.lang.String EMPTY_STRING
           
protected  java.lang.String linkName
           
protected  java.util.List<DBRelation> relations
           
protected  java.lang.String schema
          the database schema *
static DBDatabase.DBSystemDate SYSDATE
           
protected  java.util.List<DBTable> tables
           
protected  java.util.List<DBView> views
           
 
Constructor Summary
DBDatabase()
          Constructs a new DBDatabase object set the variable 'schema' = null.
DBDatabase(java.lang.String schema)
          Constructs a new DBDatabase object and sets the specified schema object.
DBDatabase(java.lang.String schema, java.lang.String linkName)
          Constructs a new DBDatabase object and sets the specified schema object.
 
Method Summary
 boolean addRelation(DBRelation.DBReference reference)
          Adds a foreign key relation to the database.
 boolean addRelation(DBRelation.DBReference ref1, DBRelation.DBReference ref2)
          Add a foreign key relation to the database.
 boolean addRelation(java.lang.String name, DBRelation.DBReference[] references)
          Adds a foreign key relation to the database.
 boolean addTable(DBTable table)
          Adds a DBTable object to list of database tables.
There is usually no need to call this function directly since it is internally called from the DBTable's constructor.
 boolean addView(DBView view)
          Adds a DBView object to list of database views.
There is usually no need to call this function directly since it is internally called from the DBView's constructor.
 void appendQualifiedName(java.lang.StringBuilder buf, java.lang.String name, boolean quoteName)
          Adds a full qualified object name including schema prefix and database link postfix (if any).
protected  boolean checkOpen()
           
 void close(java.sql.Connection conn)
          closes this database object by detaching it from the driver this is a shortcut for calling getDriver().closeDatabase(db, conn)
 void closeResultSet(java.sql.ResultSet rset)
          Convenience function for closing a JDBC Resultset
Use it instead of rset.close() and stmt.close()
 void closeStatement(java.sql.Statement stmt)
          Convenience function for closing a JDBC Resultset
Use it instead of stmt.close()
 boolean commit(java.sql.Connection conn)
          Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection.
 DBCommand createCommand()
          Creates a new Command object for this database
 java.sql.ResultSet executeQuery(java.lang.String sqlCmd, java.lang.Object[] sqlParams, boolean scrollable, java.sql.Connection conn)
          Executes a select SQL-Statement and returns a resulset containing the query results.
This function returns a JDBC ResultSet.
Insteam of using this function directly you should use a DBReader object instead.
 int executeSQL(java.lang.String sqlCmd, java.sql.Connection conn)
          Executes an update, insert or delete SQL-Statement.
We recommend to use a DBCommand object in order to build the sqlCmd.
 int executeSQL(java.lang.String sqlCmd, java.lang.Object[] sqlParams, java.sql.Connection conn)
           
 int executeSQL(java.lang.String sqlCmd, java.lang.Object[] sqlParams, java.sql.Connection conn, DBDatabaseDriver.DBSetGenKeys setGenKeys)
          Executes an update, insert or delete SQL-Statement.
We recommend to use a DBCommand object in order to build the sqlCmd.
 boolean getCreateDDLScript(DBDatabaseDriver driver, DBSQLScript script)
          Creates a DDL Script for creating all database objects on the target database.
This function may be called even if the database has not been previously opened.
 DBDatabase getDatabase()
          Returns the database object to which this object belongs to.
 DBDatabaseDriver getDriver()
          Returns the driver for this database.
 java.lang.String getLinkName()
          Returns the database link name.
 java.lang.Object getNextSequenceValue(java.lang.String seqName, java.sql.Connection conn)
           
 java.lang.String getQualifiedName(java.lang.String name)
          Deprecated. 
 java.util.List<DBRelation> getRelations()
          Returns the relations which have been defined in the database.
 java.lang.String getSchema()
          Returns the schema for SQL statements.
 java.lang.String getSchemaPrefix()
          Returns the schema-prefix for SQL statements e.g.
 DBValueExpr getSystemDateExpr()
          Creates and returns a value object for the database systems current date and time.
 DBTable getTable(java.lang.String name)
          Finds a DBTable object by name.
 java.util.List<DBTable> getTables()
          Returns the tables which have been defined in the database.
 java.sql.Timestamp getUpdateTimestamp(java.sql.Connection conn)
          Returns a timestamp that is used for record updates.
 DBValueExpr getValueExpr(boolean value)
          Creates and returns a value object for the given boolean value.
 DBValueExpr getValueExpr(int value)
          Creates and returns a value object for the given integer value.
 DBValueExpr getValueExpr(long value)
          Creates and returns a value object for the given long value.
 DBValueExpr getValueExpr(java.lang.Object value, DataType dataType)
          Creates and returns a value object for the given value.
 DBValueExpr getValueExpr(java.lang.String value)
          Creates and returns a value object for the given string value.
 DBView getView(java.lang.String name)
          Finds a DBView object by name.
 java.util.List<DBView> getViews()
          Returns the views which have been defined in the database.
 boolean isOpen()
          Indicates whether the database has been opened.
 boolean isPreparedStatementsEnabled()
          return whether prepared statements are preferred over normal statements (Default is false) Note: This will only apply for update and insert commands as well as for read operations on a DBRecord.
 boolean open(DBDatabaseDriver driver, java.sql.Connection conn)
          Sets the database driver for this database.
 java.util.List<java.lang.Object[]> queryObjectList(java.lang.String sqlCmd, java.sql.Connection conn)
          Returns the result of a query as a list Object-Arrays This function should only be used for small lists.
 int queryObjectList(java.lang.String sqlCmd, java.sql.Connection conn, java.util.Collection<java.lang.Object[]> result)
          Adds the result of a query to a given collection.
The individual rows will be added as an array of objects (object[])
 Options queryOptionList(java.lang.String sqlCmd, java.sql.Connection conn)
          Returns a list of key value pairs from an sql query.
<T> java.util.List<T>
querySimpleList(java.lang.Class<T> c, java.lang.String sqlCmd, java.sql.Connection conn)
          Returns a one dimensional array from an sql query.
<T> int
querySimpleList(java.lang.Class<T> c, java.lang.String sqlCmd, java.sql.Connection conn, java.util.Collection<T> result)
          Adds the first column of a query result to a collection.
 java.util.List<java.lang.Object> querySimpleList(java.lang.String sqlCmd, java.sql.Connection conn)
          Returns a one dimensional array from an sql query.
 double querySingleDouble(java.lang.String sqlCmd, java.sql.Connection conn)
          Returns the value of the first row/column of a sql-query as a double.
 double querySingleDouble(java.lang.String sqlCmd, double defVal, java.sql.Connection conn)
          Returns the value of the first row/column of a sql-query as a double.
 int querySingleInt(java.lang.String sqlCmd, java.sql.Connection conn)
          Returns the value of the first row/column of a sql-query as an int.
 int querySingleInt(java.lang.String sqlCmd, int defVal, java.sql.Connection conn)
          Returns the value of the first row/column of a sql-query as an int.
 long querySingleLong(java.lang.String sqlCmd, java.sql.Connection conn)
          Returns the value of the first row/column of a sql-query as a long.
 long querySingleLong(java.lang.String sqlCmd, long defVal, java.sql.Connection conn)
          Returns the value of the first row/column of a sql-query as a long.
 java.lang.String querySingleString(java.lang.String sqlCmd, java.sql.Connection conn)
          Returns the value of the first row/column of a sql-query as a string.
 java.lang.String querySingleString(java.lang.String sqlCmd, java.lang.String defVal, java.sql.Connection conn)
          Returns the value of the first row/column of a sql-query as a string.
 java.lang.Object querySingleValue(java.lang.String sqlCmd, java.sql.Connection conn)
          Returns the value of the first row/column of a sql-query as an object.
 boolean rollback(java.sql.Connection conn)
          Discards all changes made since the previous commit/rollback and releases any database locks currently held by this Connection.
 boolean setLinkName(java.lang.String linkName)
          Sets the name of the database link used to identify objects.
 void setPreparedStatementsEnabled(boolean preparedStatementsEnabled)
          enables or disables the use of prepared statements for update and insert commands as well as for read operations on a DBRecord.
 boolean setSchema(java.lang.String schema)
          Sets the schema for SQL statements.
 
Methods inherited from class org.apache.empire.db.DBObject
error, error
 
Methods inherited from class org.apache.empire.commons.ErrorObject
clearError, clearErrorInfo, error, error, error, error, error, getErrorInfo, getErrorMessage, getErrorParams, getErrorSource, getErrorType, getMessage, hasError, internalSetError, isExceptionsEnabled, setExceptionsEnabled, success
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSDATE

public static final DBDatabase.DBSystemDate SYSDATE

EMPTY_STRING

public static final java.lang.String EMPTY_STRING
See Also:
Constant Field Values

schema

protected java.lang.String schema
the database schema *


linkName

protected java.lang.String linkName

tables

protected java.util.List<DBTable> tables

relations

protected java.util.List<DBRelation> relations

views

protected java.util.List<DBView> views

driver

protected DBDatabaseDriver driver
Constructor Detail

DBDatabase

public DBDatabase()
Constructs a new DBDatabase object set the variable 'schema' = null.


DBDatabase

public DBDatabase(java.lang.String schema)
Constructs a new DBDatabase object and sets the specified schema object.

Parameters:
schema - the database schema

DBDatabase

public DBDatabase(java.lang.String schema,
                  java.lang.String linkName)
Constructs a new DBDatabase object and sets the specified schema object.

Parameters:
schema - the database schema
linkName - the database link name
Method Detail

getDriver

public DBDatabaseDriver getDriver()
Returns the driver for this database.

Returns:
Returns the driver for this database

isPreparedStatementsEnabled

public boolean isPreparedStatementsEnabled()
return whether prepared statements are preferred over normal statements (Default is false) Note: This will only apply for update and insert commands as well as for read operations on a DBRecord. For custom SQL commands parameters must be explicitly declared using cmd.addCmdParam();

Returns:
true if prepared Statements are enabled or false if not

setPreparedStatementsEnabled

public void setPreparedStatementsEnabled(boolean preparedStatementsEnabled)
enables or disables the use of prepared statements for update and insert commands as well as for read operations on a DBRecord. Note: For custom SQL commands parameters must be explicitly declared using cmd.addCmdParam();

Parameters:
preparedStatementsEnabled -

open

public boolean open(DBDatabaseDriver driver,
                    java.sql.Connection conn)
Sets the database driver for this database. This will set up the connection for use.

Parameters:
driver - the databae driver
conn - the connection
Returns:
true on succes

close

public void close(java.sql.Connection conn)
closes this database object by detaching it from the driver this is a shortcut for calling getDriver().closeDatabase(db, conn)

Parameters:
conn - the connection to close

getCreateDDLScript

public boolean getCreateDDLScript(DBDatabaseDriver driver,
                                  DBSQLScript script)
Creates a DDL Script for creating all database objects on the target database.
This function may be called even if the database has not been previously opened.

Once the database is open you can use getDriver().getDLLCommand() to create, alter or delete other database objects

Parameters:
driver - The driver for which to create a DDL Script
script - the script object that will be completed
Returns:
the DLL script for creating the entire database schema

getDatabase

public DBDatabase getDatabase()
Description copied from class: DBObject
Returns the database object to which this object belongs to. For the database object itself this function will return the this pointer.

Specified by:
getDatabase in class DBObject
Returns:
the database object
See Also:
DBObject.getDatabase()

getSchema

public java.lang.String getSchema()
Returns the schema for SQL statements.

Returns:
the schema

setSchema

public boolean setSchema(java.lang.String schema)
Sets the schema for SQL statements.

Parameters:
schema - the schema to set
Returns:
true on succes

getSchemaPrefix

public java.lang.String getSchemaPrefix()
Returns the schema-prefix for SQL statements e.g. "SCHEMA." or empty string if no schema is defined.

Returns:
the schema-prefix

getLinkName

public java.lang.String getLinkName()
Returns the database link name.

Returns:
the name of the database link

setLinkName

public boolean setLinkName(java.lang.String linkName)
Sets the name of the database link used to identify objects.

Parameters:
linkName - the database link name
Returns:
true on succes

getQualifiedName

@Deprecated
public java.lang.String getQualifiedName(java.lang.String name)
Deprecated. 

Returns the full qualified object name including schema prefix and database link postfix (if any).

Parameters:
name - the object's name
Returns:
the qualified object name

appendQualifiedName

public void appendQualifiedName(java.lang.StringBuilder buf,
                                java.lang.String name,
                                boolean quoteName)
Adds a full qualified object name including schema prefix and database link postfix (if any). to the string buffer suppield

Parameters:
buf - the string buffer to which to append the qualified object name
name - the object's name
quoteName - use quotes or not

getSystemDateExpr

public DBValueExpr getSystemDateExpr()
Creates and returns a value object for the database systems current date and time.

Returns:
a DBValueExpr object

getValueExpr

public DBValueExpr getValueExpr(java.lang.String value)
Creates and returns a value object for the given string value.

Parameters:
value - the String value
Returns:
the new DBValueExpr object

getValueExpr

public DBValueExpr getValueExpr(boolean value)
Creates and returns a value object for the given boolean value.

Parameters:
value - the Boolean value
Returns:
the new DBValueExpr object

getValueExpr

public DBValueExpr getValueExpr(int value)
Creates and returns a value object for the given integer value.

Parameters:
value - the int value
Returns:
the new DBValueExpr object

getValueExpr

public DBValueExpr getValueExpr(long value)
Creates and returns a value object for the given long value.

Parameters:
value - the long value
Returns:
the new DBValueExpr object

getValueExpr

public DBValueExpr getValueExpr(java.lang.Object value,
                                DataType dataType)
Creates and returns a value object for the given value.

Parameters:
value - the value
dataType - the database systems data type used for this value
Returns:
the new DBValueExpr object

addTable

public boolean addTable(DBTable table)
Adds a DBTable object to list of database tables.
There is usually no need to call this function directly since it is internally called from the DBTable's constructor.

Parameters:
table - the DBTable object
Returns:
true if successful

getTables

public java.util.List<DBTable> getTables()
Returns the tables which have been defined in the database.

Returns:
db tables.

getTable

public DBTable getTable(java.lang.String name)
Finds a DBTable object by name.

Parameters:
name - the name of the table
Returns:
the located DBTable object

addRelation

public final boolean addRelation(DBRelation.DBReference reference)
Adds a foreign key relation to the database.

Parameters:
reference - a reference for a source and target column pair
Returns:
true if the relations were successfully created.

addRelation

public final boolean addRelation(DBRelation.DBReference ref1,
                                 DBRelation.DBReference ref2)
Add a foreign key relation to the database.

Parameters:
ref1 - a reference for a source and target column pair
ref2 - a reference for a source and target column pair
Returns:
true if the relations were successfully created.

addRelation

public boolean addRelation(java.lang.String name,
                           DBRelation.DBReference[] references)
Adds a foreign key relation to the database.

Parameters:
name - the relation name
references - a list of source and target column pairs
Returns:
true if the relations were successfully created.

getRelations

public java.util.List<DBRelation> getRelations()
Returns the relations which have been defined in the database.

Returns:
db relations.

addView

public boolean addView(DBView view)
Adds a DBView object to list of database views.
There is usually no need to call this function directly since it is internally called from the DBView's constructor.

Parameters:
view - the DBView object
Returns:
true if successful

getViews

public java.util.List<DBView> getViews()
Returns the views which have been defined in the database.

Returns:
db views.

getView

public DBView getView(java.lang.String name)
Finds a DBView object by name.

Parameters:
name - the name of the view
Returns:
the located DBTable object

isOpen

public boolean isOpen()
Indicates whether the database has been opened.

Returns:
The name of the encoding or null if a single byte encoding is used.

checkOpen

protected boolean checkOpen()
Returns:
true if the database has been opened or false otherwise

createCommand

public DBCommand createCommand()
Creates a new Command object for this database

Returns:
the command object.

getUpdateTimestamp

public java.sql.Timestamp getUpdateTimestamp(java.sql.Connection conn)
Returns a timestamp that is used for record updates.

Parameters:
conn - the connection
Returns:
the current date and time.

getNextSequenceValue

public java.lang.Object getNextSequenceValue(java.lang.String seqName,
                                             java.sql.Connection conn)

querySingleValue

public java.lang.Object querySingleValue(java.lang.String sqlCmd,
                                         java.sql.Connection conn)
Returns the value of the first row/column of a sql-query as an object.

Parameters:
sqlCmd - the SQL-Command
conn - a valid connection to the database.
Returns:
the first column in the current row as a Java object or null if there was no value

querySingleInt

public int querySingleInt(java.lang.String sqlCmd,
                          int defVal,
                          java.sql.Connection conn)
Returns the value of the first row/column of a sql-query as an int.

Parameters:
sqlCmd - the SQL statement
defVal - the default value if no value was returned by the database
conn - a valid connection to the database.
Returns:
the result as a int value, if no result the int value 0

querySingleInt

public final int querySingleInt(java.lang.String sqlCmd,
                                java.sql.Connection conn)
Returns the value of the first row/column of a sql-query as an int.

Parameters:
sqlCmd - the SQL statement
conn - a valid connection to the database.
Returns:
the result as a int value, if no result the int value 0

querySingleLong

public long querySingleLong(java.lang.String sqlCmd,
                            long defVal,
                            java.sql.Connection conn)
Returns the value of the first row/column of a sql-query as a long.

Parameters:
sqlCmd - the SQL statement
defVal - the default value
conn - a valid connection to the database.
Returns:
the result as a long value, if no result the long value 0

querySingleLong

public final long querySingleLong(java.lang.String sqlCmd,
                                  java.sql.Connection conn)
Returns the value of the first row/column of a sql-query as a long.

Parameters:
sqlCmd - the SQL statement
conn - a valid connection to the database.
Returns:
the result as a long value, if no result the long value 0

querySingleDouble

public double querySingleDouble(java.lang.String sqlCmd,
                                double defVal,
                                java.sql.Connection conn)
Returns the value of the first row/column of a sql-query as a double.

Parameters:
sqlCmd - the SQL statement
defVal - the default value
conn - a valid connection to the database.
Returns:
the result as a long value, if no result the long value 0

querySingleDouble

public final double querySingleDouble(java.lang.String sqlCmd,
                                      java.sql.Connection conn)
Returns the value of the first row/column of a sql-query as a double.

Parameters:
sqlCmd - the SQL statement
conn - a valid connection to the database.
Returns:
the result as a long value, if no result the long value 0

querySingleString

public java.lang.String querySingleString(java.lang.String sqlCmd,
                                          java.lang.String defVal,
                                          java.sql.Connection conn)
Returns the value of the first row/column of a sql-query as a string.

Parameters:
sqlCmd - the SQL statement
defVal - the default value if no value was returned by the database
conn - a valid connection to the database.
Returns:
the result as a String object, if no result a emtpy String

querySingleString

public final java.lang.String querySingleString(java.lang.String sqlCmd,
                                                java.sql.Connection conn)
Returns the value of the first row/column of a sql-query as a string.

Parameters:
sqlCmd - the SQL statement
conn - a valid connection to the database.
Returns:
the result as a String object, if no result a emtpy String

querySimpleList

public <T> int querySimpleList(java.lang.Class<T> c,
                               java.lang.String sqlCmd,
                               java.sql.Connection conn,
                               java.util.Collection<T> result)
Adds the first column of a query result to a collection.

Type Parameters:
T - the type for the list
Parameters:
c - the class type for the list
sqlCmd - the SQL statement
conn - a valid connection to the database.
Returns:
the number of elements that have been added to the collection or -1 if an error occurred

querySimpleList

public <T> java.util.List<T> querySimpleList(java.lang.Class<T> c,
                                             java.lang.String sqlCmd,
                                             java.sql.Connection conn)
Returns a one dimensional array from an sql query. The array is filled with the values of the first column.

Type Parameters:
T - the type for the list
Parameters:
c - the class type for the list
sqlCmd - the SQL statement
conn - a valid connection to the database.
Returns:
a list of the values of the first column of an sql query

querySimpleList

public java.util.List<java.lang.Object> querySimpleList(java.lang.String sqlCmd,
                                                        java.sql.Connection conn)
Returns a one dimensional array from an sql query. The array is filled with the values of the first column.

Parameters:
sqlCmd - the SQL statement
conn - a valid connection to the database.
Returns:
a list of values of type Object

queryOptionList

public Options queryOptionList(java.lang.String sqlCmd,
                               java.sql.Connection conn)
Returns a list of key value pairs from an sql query. The option list is filled with the values of the first and second column.

Parameters:
sqlCmd - the SQL statement
conn - a valid connection to the database.
Returns:
an Options object containing a set a of values and their corresponding names

queryObjectList

public int queryObjectList(java.lang.String sqlCmd,
                           java.sql.Connection conn,
                           java.util.Collection<java.lang.Object[]> result)
Adds the result of a query to a given collection.
The individual rows will be added as an array of objects (object[])

This function should only be used for small lists. Otherwise a DBReader should be used!

Parameters:
sqlCmd - the SQL statement
conn - a valid connection to the database.
Returns:
a list of object arrays

queryObjectList

public java.util.List<java.lang.Object[]> queryObjectList(java.lang.String sqlCmd,
                                                          java.sql.Connection conn)
Returns the result of a query as a list Object-Arrays This function should only be used for small lists.

Parameters:
sqlCmd - the SQL statement
conn - a valid connection to the database.
Returns:
a list of object arrays

executeSQL

public int executeSQL(java.lang.String sqlCmd,
                      java.lang.Object[] sqlParams,
                      java.sql.Connection conn,
                      DBDatabaseDriver.DBSetGenKeys setGenKeys)
Executes an update, insert or delete SQL-Statement.
We recommend to use a DBCommand object in order to build the sqlCmd.

Parameters:
sqlCmd - the SQL-Command
sqlParams - a list of objects to replace sql parameters
conn - a valid connection to the database.
setGenKeys - object to set the generated keys for
Returns:
the row count for insert, update or delete or 0 for SQL statements that return nothing

executeSQL

public final int executeSQL(java.lang.String sqlCmd,
                            java.lang.Object[] sqlParams,
                            java.sql.Connection conn)

executeSQL

public final int executeSQL(java.lang.String sqlCmd,
                            java.sql.Connection conn)
Executes an update, insert or delete SQL-Statement.
We recommend to use a DBCommand object in order to build the sqlCmd.

Parameters:
sqlCmd - the SQL-Command
conn - a valid connection to the database.
Returns:
the row count for insert, update or delete or 0 for SQL statements that return nothing

executeQuery

public java.sql.ResultSet executeQuery(java.lang.String sqlCmd,
                                       java.lang.Object[] sqlParams,
                                       boolean scrollable,
                                       java.sql.Connection conn)
Executes a select SQL-Statement and returns a resulset containing the query results.
This function returns a JDBC ResultSet.
Insteam of using this function directly you should use a DBReader object instead.

Parameters:
sqlCmd - the SQL-Command
sqlParams - a list of parameters for parameter queries (may depend on driver)
scrollable - true if the reader should be scrollable or false if not
conn - a valid connection to the database.
Returns:
the JDBC ResutSet

commit

public boolean commit(java.sql.Connection conn)
Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection.

Parameters:
conn - a valid database connection
Returns:
true if successful

rollback

public boolean rollback(java.sql.Connection conn)
Discards all changes made since the previous commit/rollback and releases any database locks currently held by this Connection.

Parameters:
conn - a valid database connection
Returns:
true if successful

closeStatement

public void closeStatement(java.sql.Statement stmt)
Convenience function for closing a JDBC Resultset
Use it instead of stmt.close()

Parameters:
stmt - a Statement object

closeResultSet

public void closeResultSet(java.sql.ResultSet rset)
Convenience function for closing a JDBC Resultset
Use it instead of rset.close() and stmt.close()

Parameters:
rset - a ResultSet object


Copyright © 2008-2011 Apache Software Foundation. All Rights Reserved.