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

    return false;
  }
 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);
   }
 }