org.apache.derby.impl.tools.ij
Class utilMain14

java.lang.Object
  extended byorg.apache.derby.impl.tools.ij.utilMain
      extended byorg.apache.derby.impl.tools.ij.utilMain14
All Implemented Interfaces:
java.security.PrivilegedAction

public class utilMain14
extends utilMain

This class is utilities specific to the two ij Main's. This factoring enables sharing the functionality for single and dual connection ij runs.

Author:
jerry

Field Summary
private static java.lang.String JDBC_NOTSUPPORTED
           
 
Fields inherited from class org.apache.derby.impl.tools.ij.utilMain
BUFFEREDFILESIZE, charStream, commandGrabber, connEnv, currCE, ijParser, ijTokMgr, isJCC, langUtil, oldGrabbers
 
Constructor Summary
utilMain14(int numConnections, LocalizedOutput out)
          Set up the test to run with 'numConnections' connections/users.
utilMain14(int numConnections, LocalizedOutput out, java.util.Hashtable ignoreErrors)
          Set up the test to run with 'numConnections' connections/users.
 
Method Summary
 java.sql.Statement createStatement(java.sql.Connection conn, int scrollType, int holdType)
          Create the right kind of statement (scrolling or not) off of the specified connection.
 int getHoldability(java.sql.Connection conn)
          JDBC 3.0 Retrieves the current holdability of ResultSet objects created using this Connection object.
 utilMain getUtilMain()
          Return the right utilMain to use.
 java.sql.Connection setHoldability(java.sql.Connection conn, int holdType)
          Connections by default create ResultSet objects with holdability true.
 
Methods inherited from class org.apache.derby.impl.tools.ij.utilMain
absolute, afterLast, beforeFirst, doPrompt, first, getConnAttributeDefaults, getCurrentRowNumber, go, handleSQLException, last, newInput, newResourceInput, previous, relative, run, setMtUse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JDBC_NOTSUPPORTED

private static final java.lang.String JDBC_NOTSUPPORTED
See Also:
Constant Field Values
Constructor Detail

utilMain14

public utilMain14(int numConnections,
                  LocalizedOutput out)
           throws ijFatalException
Set up the test to run with 'numConnections' connections/users.

Parameters:
numConnections - The number of connections/users to test.

utilMain14

public utilMain14(int numConnections,
                  LocalizedOutput out,
                  java.util.Hashtable ignoreErrors)
           throws ijFatalException
Set up the test to run with 'numConnections' connections/users.

Parameters:
numConnections - The number of connections/users to test.
ignoreErrors - A list of errors to ignore. If null, all errors are printed out and nothing is fatal. If non-null, if an error is hit and it is in this list, it is silently ignore. Otherwise, an ijFatalException is thrown. ignoreErrors is used for stress tests.
Method Detail

getUtilMain

public utilMain getUtilMain()
Return the right utilMain to use. (JDBC 1.1 or 2.0 or 3.0)

Overrides:
getUtilMain in class utilMain

setHoldability

public java.sql.Connection setHoldability(java.sql.Connection conn,
                                          int holdType)
                                   throws java.sql.SQLException
Connections by default create ResultSet objects with holdability true. This method can be used to change the holdability of the connection by passing one of ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT

Overrides:
setHoldability in class utilMain
Parameters:
conn - The connection.
holdType - The new holdability for the Connection object.
Returns:
The connection object with holdability set to passed value.
Throws:
java.sql.SQLException

getHoldability

public int getHoldability(java.sql.Connection conn)
                   throws java.sql.SQLException
JDBC 3.0 Retrieves the current holdability of ResultSet objects created using this Connection object.

Overrides:
getHoldability in class utilMain
Returns:
The holdability, one of ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
Throws:
java.sql.SQLException

createStatement

public java.sql.Statement createStatement(java.sql.Connection conn,
                                          int scrollType,
                                          int holdType)
                                   throws java.sql.SQLException
Create the right kind of statement (scrolling or not) off of the specified connection.

Overrides:
createStatement in class utilMain
Parameters:
conn - The connection.
scrollType - The scroll type of the cursor.
Returns:
The statement.
Throws:
java.sql.SQLException

Built on Mon 2007-06-04 09:58:47+0400, from revision ???

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.