You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SchedulesDbo.java 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. package com.rthoni.stssaguenay.dbo;
  2. import com.luticate.utils.dbo.LuDbo;
  3. import com.luticate.utils.dbo.LuPaginatedDbo;
  4. import org.joda.time.LocalDateTime;
  5. import org.joda.time.LocalTime;
  6. import org.joda.time.format.DateTimeFormat;
  7. import org.joda.time.format.DateTimeFormatter;
  8. import org.json.JSONArray;
  9. import org.json.JSONException;
  10. import org.json.JSONObject;
  11. import java.util.HashMap;
  12. import java.util.List;
  13. import java.util.Vector;
  14. /**
  15. * Created by robin on 10/1/16.
  16. */
  17. public class SchedulesDbo extends LuDbo {
  18. public static class SchedulesDboArray extends LuPaginatedDbo<SchedulesDbo>
  19. {
  20. }
  21. protected String _stopId;
  22. protected String _routeId;
  23. protected List<LocalDateTime> _schedules;
  24. // @Override
  25. // public void fromJson(JSONObject json) throws JSONException {
  26. // _stopId = json.getString("stopId");
  27. // _routeId = json.getString("routeId");
  28. // _schedules = new Vector<>();
  29. // JSONArray schedules = json.getJSONArray("schedules");
  30. // for (int i = 0; i < schedules.length(); ++i) {
  31. // _schedules.add(LocalDateTime.parse(schedules.getString(i), DateTimeFormat.forPattern("y-M-d H:m:s")));
  32. // }
  33. // }
  34. //
  35. // @Override
  36. // public HashMap<String, Object> toArray() {
  37. // return null;
  38. // }
  39. public String getStopId() {
  40. return _stopId;
  41. }
  42. public void setStopId(String stopId) {
  43. _stopId = stopId;
  44. }
  45. public String getRouteId() {
  46. return _routeId;
  47. }
  48. public void setRouteId(String routeId) {
  49. _routeId = routeId;
  50. }
  51. public List<LocalDateTime> getSchedules() {
  52. return _schedules;
  53. }
  54. public void setSchedules(List<LocalDateTime> schedules) {
  55. _schedules = schedules;
  56. }
  57. }