class DBOperations
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
private java.sql.Connection |
con |
private java.sql.SQLException |
exception |
private int |
keyVal |
private java.lang.Throwable |
unexpectedException |
| Constructor and Description |
|---|
DBOperations(java.sql.Connection con,
int keyValue)
Instantiates DBOperation object.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
commit()
commits the trasnaction.
|
(package private) void |
delete()
Deletes the record with key value passed in constroctor.
|
(package private) java.sql.SQLException |
getException()
Returns the SQLException received while executing insert.
|
java.lang.Throwable |
getUnexpectedException()
Returns if any unexpected trasnaction was thrown during any
of the operation.
|
(package private) void |
insert()
Inserts a record with key value passed in constroctor.
|
(package private) void |
rollback()
Rollbacks the transaction.
|
void |
run() |
private java.sql.Connection con
private int keyVal
private java.sql.SQLException exception
private java.lang.Throwable unexpectedException
DBOperations(java.sql.Connection con,
int keyValue)
throws java.sql.SQLException
con - Connection to be used within this object.keyValue - key value while executing dmls.java.sql.SQLExceptionvoid delete()
throws java.sql.SQLException
java.sql.SQLExceptionvoid insert()
throws java.sql.SQLException
java.sql.SQLExceptionvoid rollback()
throws java.sql.SQLException
java.sql.SQLExceptionjava.sql.SQLException getException()
void commit()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.Throwable getUnexpectedException()
public void run()
run in interface java.lang.RunnableApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.