/** * This Method is the Unit of Work related to a Item Deletion. This returns a boolean value based * on the Deletion Result. * * @param wodId - WorkOrder Detail Id(Product Key) Primary Key of WRK_ORDR_DETS table * @return boolean - TRUE ( If Deletion Success) FALSE (Deletion Failed) */ public boolean deleteProduct(long wodId) throws RemoteException { WrkOrdrDets wrkordrdts_obj = new WrkOrdrDets(conn); // Check if the Product credit is greater than zero if (wrkordrdts_obj.getProductDiscount(wodId) > (new Double("0.00")).doubleValue()) { // If Yes return False as product cant be deleted USFEnv.getLog().writeWarn("Cannot Delete Item. Item has Discounts", this, null); return false; } // Else if credit not greater than zero Delete the Product. return wrkordrdts_obj.deleteWrkOrdrDets(wodId); }