public void addMaxAmountPolicy(int storeId, int session, int amount) { if (storeId < 0) { throw new ILLArgumentException("illegal store number"); } if (session < 0) { throw new NullReferenceException("session is a null reference"); } if (amount < 0) { throw new ILLArgumentException("illegal amount"); } db.addMaxPurchasePolicy(amount, storeId, session); }