Exemplo n.º 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();
 }
Exemplo n.º 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();
   }
 }
Exemplo n.º 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();
   }
 }
Exemplo n.º 4
0
  public boolean store() {
    try {
      return _rentalApi.store();
    } catch (NoPermissionException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    return false;
  }
Exemplo n.º 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);
   }
 }