public String getCurrentDay() { System.err.println("Enter get current day" + staff.getId()); if (staff.getPreferredDay() == null) { return ""; } return staff.getPreferredDay(); }
public List<RouteEntity> getRoutesInBase() { List<RouteEntity> routesAll = routeSessionBean.retrieveAllRoutes(); List<RouteEntity> connectionsAll = routeSessionBean.filterRoutesToConnections(routesAll); routesInBase = new ArrayList<>(); if (staff.getBase() == null) { System.err.println("Null base"); return null; } for (RouteEntity r : connectionsAll) { if (r.getOriginAirport().equals(staff.getBase()) || r.getDestinationAirport().equals(staff.getBase())) { System.err.println("route is " + r); routesInBase.add(r); } } if (routesInBase.isEmpty()) return null; return routesInBase; }
public List<RouteEntity> getCurrentRoutes() { if (staff.getPreferredRoutes().isEmpty()) { return null; } return staff.getPreferredRoutes(); }