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.SQLException
void delete() throws java.sql.SQLException
java.sql.SQLException
void insert() throws java.sql.SQLException
java.sql.SQLException
void rollback() throws java.sql.SQLException
java.sql.SQLException
java.sql.SQLException getException()
void commit() throws java.sql.SQLException
java.sql.SQLException
public java.lang.Throwable getUnexpectedException()
public void run()
run
in interface java.lang.Runnable
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.