/** * This Method is the Unit of Work related to a Product Saving. This returns a boolean value based * on the Save Result. * * @param wod_obj - wodObj that has the info related to the Product that need to be saved to the * of WRK_ORDR_DETS table * @return boolean - TRUE ( If Updation/Insertion Success) FALSE (Save Failed) */ public boolean saveProduct(WrkOrdrDets wod_obj) throws RemoteException { WrkOrdrDets wrkordrdts_obj = new WrkOrdrDets(conn); // If the wodObj is related to Insertion of new Product if (wod_obj.getWODID() == 0) { // Assign the WOD_ID using the sequence. // wod_obj.setWODID(wrkordrdts_obj.getNewSeqId("WOD_ID")); // Insert the wod_obj return wrkordrdts_obj.insertWrkOrdrDets(wod_obj); } // If the wod_obj is related to Updation of an existing Product else { // Update the wod_obj return wrkordrdts_obj.updateWrkOrdrDets(wod_obj); } }