Beispiel #1
0
 public void setStartDate(Date time) {
   try {
     _rentalApi.setStartDate(time);
   } catch (NoPermissionException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
   _rental = _rentalApi.getRental();
   updateMessages();
 }
Beispiel #2
0
 public void loadExemplar(int exemplarId) {
   try {
     _rentalApi.setMediumExemplar(exemplarId);
     _rental = _rentalApi.getRental();
     updateMessages();
   } catch (NoPermissionException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }
Beispiel #3
0
 public void loadCustomer(int cardId) {
   try {
     _rentalApi.setCustomer(cardId);
     _rental = _rentalApi.getRental();
     updateMessages();
   } catch (NoPermissionException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }
Beispiel #4
0
  public boolean store() {
    try {
      return _rentalApi.store();
    } catch (NoPermissionException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    return false;
  }
Beispiel #5
0
 public void initialize() throws InvalidOperationException {
   try {
     _rentalApi = EjbContext.getInstance().getFactory().createRentalApi();
     _rentalApi.newRental();
     _rental = _rentalApi.getRental();
   } catch (NoPermissionException e) {
     e.printStackTrace();
   } catch (Exception e) {
     e.printStackTrace();
     throw new InvalidOperationException("Could not establish connection to server:", e);
   }
 }