|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.gcs.db.util.Transaction | +--com.ibm.gcs.db.util.PreparedTransaction
A PreparedTransaction extends the functionality of a Transaction by providing support for java.sql.PreparedStatements.
PreparedStatement
,
Connection
Fields inherited from class com.ibm.gcs.db.util.Transaction |
debug |
Constructor Summary | |
PreparedTransaction()
Default Constructor. |
|
PreparedTransaction(int isolationLevel)
Constructor. |
Method Summary | |
void |
abort()
Aborts a transaction in progress. |
void |
commit()
Commits all changes in the transaction and releases the connection. |
java.util.Hashtable |
executeQuery()
Executes a prepared sql statement which returns at most 1 row as a result. |
int |
executeUpdate()
Executes a prepared update, insert, or delete sql statement. |
void |
prepareStatement(java.lang.String sql)
Prepares a JDBC prepared statement to be executed. |
void |
setBinaryStream(int parameterIndex,
java.io.InputStream x,
int length)
Send a binary stream value as input to a LONGVARBINARY parameter. |
void |
setString(int parameterIndex,
java.lang.String x)
Set a string value as the input parameter. |
Methods inherited from class com.ibm.gcs.db.util.Transaction |
executeQuery, executeQuery, executeQueryT, executeUpdate, getBinaryStream, getConnection, getMaxSqlBytes |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PreparedTransaction()
public PreparedTransaction(int isolationLevel)
isolationLevel
- The transacation isolation level as
defined in java.sql.ConnectionMethod Detail |
public void prepareStatement(java.lang.String sql) throws TransactionException
sql
- the SQL String statement.TransactionException
- SQL error occurred
during statement creation.PreparedStatement
public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws TransactionException
parameterIndex
- the first parameter is 1,
the second is 2, ...x
- the java input stream which contains the binary
parameter value.length
- the number of bytes in the streamTransactionException
- SQL error occurred while
setting parameters.public void setString(int parameterIndex, java.lang.String x) throws TransactionException
parameterIndex
- the first parameter is 1,
the second is 2, ...x
- the java String.TransactionException
- SQL error occurred while
setting parameters.public int executeUpdate() throws TransactionException
TransactionException
- database error
occured during SQL update.public java.util.Hashtable executeQuery() throws TransactionException
sql
- the SQL statement to execute.TransactionException
- SQL error occured during
query execution. Transaction aborted.public void abort()
abort
in class Transaction
ImplementationException
- no changes to abort.public void commit() throws TransactionException
commit
in class Transaction
TransactionException
- Changes could not be
committed.ImplementationException
- No transaction
in progress.
|
EIP Web Crawler APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |