First page Back Continue Last page Graphics

Refreshing Reference to DB Sequence-Assigned Foreign Keys


Notes:

Code to Override the postChanges() Method

// In SuppliersImpl.java

RowSet newProductsBeforePost = null;

public void postChanges(TransactionEvent TransactionEvent) {

/* Only bother to update references if Product is a NEW one */

if (getPostState() == STATUS_NEW) {

/*

* Get a rowset of products related

* to this new supplier before calling super

*/

newProductsBeforePost = (RowSet)getProductsBase();

}

super.postChanges(TransactionEvent);

}