Package org.onebusaway.transit_data.model.service_alerts

Examples of org.onebusaway.transit_data.model.service_alerts.SituationQueryBean$AffectsBean


    ServiceAlert serviceAlert4 = addServiceAlertWithTimeRange(
        agencyId,
        createTimeRange(System.currentTimeMillis() - (60 * 60 * 1000),
            System.currentTimeMillis() + (60 * 60 * 1000)));

    SituationQueryBean query = new SituationQueryBean();
    // query.setAgencyId(agencyId);

    List<AffectsBean> affects = new ArrayList<AffectsBean>();
    AffectsBean e = new AffectsBean();
    e.setAgencyId(agencyId);
    affects.add(e);
    query.setAffects(affects);
    // Time is not supported by SituationQueryBean anymore
    // query.setTime(System.currentTimeMillis());

    List<ServiceAlert> alerts = _service.getServiceAlerts(query);
    assertEquals(2, alerts.size());
View Full Code Here


  @Actions({
      @Action(value = "/where/standard/service-alerts-for-stop"),
      @Action(value = "/where/iphone/service-alerts-for-stop"),
      @Action(value = "/where/text/service-alerts-for-stop")})
  public String execute() {
    SituationQueryBean query = new SituationQueryBean();
    for (String stopId : _stopIds) {
      AffectsBean affects = new SituationQueryBean.AffectsBean();
      affects.setStopId(stopId);
      query.getAffects().add(affects);
    }
    ListBean<ServiceAlertBean> list = _transitDataService.getServiceAlerts(query);
    _situations = list.getList();
    return SUCCESS;
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data.model.service_alerts.SituationQueryBean$AffectsBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.