xbn.db
Class DBConnStatement

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.db.DBConnStatement
Direct Known Subclasses:
DBCSPlain, DBCSPrepared

public abstract class DBConnStatement
extends XBNObject

A convenience class to manage a Statement, and the associated DBConnDirect and sql text.

Source code:  DBConnStatement.java.


Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
DBConnStatement(DBConnDirect db_connDirect, String s_sql)
          Create a DBConnStatement.
DBConnStatement(DBConnDirect db_connDirect, String s_sql, int i_resultSetType, int i_resultSetConcurrency)
          Create a DBConnStatement.
 
Method Summary
protected  void crashAtStatementCreate(SQLException sql_x, NullPointerException np_x)
           
 DBConnDirect getDBConnDirect()
          Get the DBConnDirect for direct manipulation.
 int getRSConcurrency()
          Get the ResultSet concurrency.
 int getRSType()
          Get the ResultSet type.
 String getSql()
          Get the sql statement.
abstract  Statement getStatement()
          Actually create and get the statement.
protected  void throwSQLX(String s_funcMsg)
           
 boolean wereExtraRSSettingsProvided()
          Were the extra ResultSet settings provided?
 
Methods inherited from class xbn.XBNObject
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBConnStatement

public DBConnStatement(DBConnDirect db_connDirect,
                       String s_sql)

Create a DBConnStatement.

Parameters:
db_connDirect - The database connection. May not be null.
s_sql - The sql statement. May not be null or zero characters in length.

DBConnStatement

public DBConnStatement(DBConnDirect db_connDirect,
                       String s_sql,
                       int i_resultSetType,
                       int i_resultSetConcurrency)

Create a DBConnStatement.

Parameters:
db_connDirect - The database connection. May not be null.
s_sql - The sql statement. May not be null or zero characters in length.
i_resultSetType - See Connection.createStatement for information.
i_resultSetConcurrency - See Connection.createStatement for information.
Method Detail

getStatement

public abstract Statement getStatement()

Actually create and get the statement.


getDBConnDirect

public final DBConnDirect getDBConnDirect()

Get the DBConnDirect for direct manipulation.

Returns:
db_connDirect exactly as provided to the constructor.

getSql

public final String getSql()

Get the sql statement.

Returns:
s_sql exactly as provided to the constructor.

getRSType

public final int getRSType()

Get the ResultSet type.

Returns:
i_resultSetType exactly as provided to the constructor.
Throws:
AssertException - If the two-parameter constructor was used, meaning the result set type setting was never provided.

getRSConcurrency

public final int getRSConcurrency()

Get the ResultSet concurrency.

Returns:
i_resultSetConcurrency exactly as provided to the constructor.
Throws:
AssertException - If the two-parameter constructor was used, meaning the result set concurrency setting was never provided.

wereExtraRSSettingsProvided

public final boolean wereExtraRSSettingsProvided()

Were the extra ResultSet settings provided?

Returns:
true If the four-parameter contructor was used.
false If the two-parameter constructor was used.

crashAtStatementCreate

protected final void crashAtStatementCreate(SQLException sql_x,
                                            NullPointerException np_x)
                                     throws SQLException

throwSQLX

protected final void throwSQLX(String s_funcMsg)
                        throws SQLException



Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.

 

http://sourceforge.net/projects/xbnjava

 

SourceForge.net Logo