Esempio n. 1
0
 public String addHistory() {
   history.setDriver(dm.getDriver(driverId));
   history.setBus(bm.getBus(busId));
   history.setRoute(rm.getRoute(routeId));
   history.setDate(date);
   hm.addHistory(history);
   history = new History();
   driverId = 0L;
   busId = 0L;
   routeId = 0L;
   historiesForDate = hm.getHistoryByDate(date);
   return "showLines?faces-redirect=true";
 }
Esempio n. 2
0
 public String deleteHistory() {
   History historyToDelete = histories.getRowData();
   hm.deleteHistory(historyToDelete);
   return null;
 }
Esempio n. 3
0
 public ListDataModel<History> getAllHistories() {
   histories.setWrappedData(hm.getAllHistory());
   return histories;
 }
Esempio n. 4
0
 public void setDate(Date date) {
   historiesForDate = hm.getHistoryByDate(date);
   this.date = date;
 }