예제 #1
0
  public void checkOut(Loan loan) throws Exception {
    Member borrower = loan.getBorrower();
    Item item = loan.getItem();
    if (!borrower.getInfo()) throw new Exception("borrower not exist");

    if (!item.getInfo()) throw new Exception("item not exist");

    if (!item.isAvailable()) {
      throw new Exception("Item currently not available.");
    }
    loan.updateAccept();
  }
예제 #2
0
 public ArrayList<Loan> getRequestList(Member borrower) throws Exception {
   Loan loan = new Loan(borrower);
   return loan.getAllRequesting();
 }
예제 #3
0
 public void Reject(Loan loan) throws Exception {
   loan.deleteFromRequst();
 }