public void addReliantDiscountTotalAmount(int store, int session, double percentage, String duration, int amount) { if (store < 0) { throw new ILLArgumentException("illegal store number"); } if (percentage <= 0 || percentage >= 1) { throw new IllegalAmountException("percentage of discount must be a number between 0 to 1"); } if (session < 0) { throw new NullReferenceException("session is a null reference"); } db.addReliantdiscountTotalAmount(store, percentage, amount, duration, session); }