Examples of TripProblemReportQueryBean


Examples of org.onebusaway.transit_data.model.problems.TripProblemReportQueryBean

  @SuppressWarnings("unchecked")
  @Test
  public void test() {

    TripProblemReportQueryBean query = new TripProblemReportQueryBean();

    AgencyAndId tripIdA = new AgencyAndId("1", "t-a");
    AgencyAndId tripIdB = new AgencyAndId("1", "t-b");

    TripBean tripA = new TripBean();
View Full Code Here

Examples of org.onebusaway.transit_data.model.problems.TripProblemReportQueryBean

    assertEquals(1, records.size());
  }

  private TripProblemReportQueryBean query(String agencyId, String tripId,
      long timeFrom, long timeTo, EProblemReportStatus status, String label) {
    TripProblemReportQueryBean query = new TripProblemReportQueryBean();
    query.setAgencyId(agencyId);
    query.setTripId(tripId);
    query.setTimeFrom(timeFrom);
    query.setTimeTo(timeTo);
    query.setStatus(status);
    query.setLabel(label);
    return query;
  }
View Full Code Here

Examples of org.onebusaway.transit_data.model.problems.TripProblemReportQueryBean

  @Validations(requiredStrings = {@RequiredStringValidator(fieldName = "agencyId", message = "missing required agencyId field")})
  public String agency() {

    long t = System.currentTimeMillis();

    TripProblemReportQueryBean query = new TripProblemReportQueryBean();
    query.setAgencyId(_agencyId);
    query.setTimeFrom(0);
    query.setTimeTo(t);

    if (_days > 0)
      query.setTimeFrom(t - _days * 24 * 60 * 60 * 1000);

    if (_status != null)
      query.setStatus(EProblemReportStatus.valueOf(_status.toUpperCase()));

    ListBean<TripProblemReportSummaryBean> resultByTrip = _transitDataService.getTripProblemReportSummariesByGrouping(
        query, ETripProblemGroupBy.TRIP);
    _summariesByTrip = resultByTrip.getList();

View Full Code Here

Examples of org.onebusaway.transit_data.model.problems.TripProblemReportQueryBean

    Calendar c = Calendar.getInstance();
    long timeTo = c.getTimeInMillis();
    c.add(Calendar.DAY_OF_WEEK, -_days);
    long timeFrom = c.getTimeInMillis();

    TripProblemReportQueryBean query = new TripProblemReportQueryBean();
    query.setAgencyId(_agencyId);
    query.setTimeFrom(timeFrom);
    query.setTimeTo(timeTo);
    if (_status != null)
      query.setStatus(EProblemReportStatus.valueOf(_status));
    query.setLabel(_label);

    ListBean<TripProblemReportBean> result = _transitDataService.getTripProblemReports(query);
    List<TripProblemReportBean> reports = result.getList();

    _feed = new SyndFeedImpl();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.