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.

RoutesDbo.java 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. package com.rthoni.stssaguenay.dbo;
  2. import com.luticate.utils.dbo.LuDbo;
  3. import com.luticate.utils.dbo.LuPaginatedDbo;
  4. import org.json.JSONException;
  5. import org.json.JSONObject;
  6. import java.util.HashMap;
  7. /**
  8. * Created by robin on 9/30/16.
  9. */
  10. public class RoutesDbo extends LuDbo {
  11. public static class PaginatedRoutesDbo extends LuPaginatedDbo<RoutesDbo>
  12. {
  13. }
  14. protected String _id;
  15. protected String _name;
  16. protected String _bgColor;
  17. protected String _fgColor;
  18. @Override
  19. public void fromJson(JSONObject json) throws JSONException {
  20. _id = json.getString("id");
  21. _name = json.getString("name");
  22. _bgColor = json.getString("bgColor");
  23. _fgColor = json.getString("fgColor");
  24. }
  25. @Override
  26. public HashMap<String, Object> toArray() {
  27. return null;
  28. }
  29. public String getId() {
  30. return _id;
  31. }
  32. public void setId(String id) {
  33. _id = id;
  34. }
  35. public String getFullName()
  36. {
  37. return String.format("%s - %s", _id, _name);
  38. }
  39. public String getName() {
  40. return _name;
  41. }
  42. public void setName(String name) {
  43. _name = name;
  44. }
  45. public String getBgColor() {
  46. return _bgColor;
  47. }
  48. public void setBgColor(String bgColor) {
  49. _bgColor = bgColor;
  50. }
  51. public String getFgColor() {
  52. return _fgColor;
  53. }
  54. public void setFgColor(String fgColor) {
  55. _fgColor = fgColor;
  56. }
  57. }