コード例 #1
0
  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;
  }
コード例 #2
0
 public RouteEntity getRoute() {
   if (routeSessionBean.getRouteForPreference() == null) {
     return null;
   }
   return routeSessionBean.getRouteForPreference();
 }