1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.kuali.mobility.bus.entity;
16
17 import java.io.Serializable;
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import javax.xml.bind.annotation.XmlElement;
22 import javax.xml.bind.annotation.XmlRootElement;
23 import javax.xml.bind.annotation.XmlSeeAlso;
24
25
26
27
28
29 @XmlRootElement(name = "busRoute")
30 @XmlSeeAlso({BusStopImpl.class})
31 public class BusRouteImpl implements Serializable, BusRoute {
32
33 private static final long serialVersionUID = 1043079110559627281L;
34
35 private long id;
36
37 private String name;
38
39 @XmlElement(name="stops")
40 private List<BusStopImpl> stops;
41
42 private String color;
43
44 private BusRoutePath path;
45
46
47
48
49
50 public long getId() {
51 return id;
52 }
53
54
55
56
57 public void setId(long id) {
58 this.id = id;
59 }
60
61
62
63
64 public String getName() {
65 return name;
66 }
67
68
69
70
71 public void setName(String name) {
72 this.name = name;
73 }
74
75
76
77
78 public List<? extends BusStopImpl> getStops() {
79 return stops;
80 }
81
82
83
84
85 public void setStops(List<? extends BusStop> stops) {
86 this.stops = (List<BusStopImpl>)(List<?>) stops;
87 }
88
89 public void addStop(BusStop stop)
90 {
91 if( null == getStops() ) {
92 setStops( new ArrayList<BusStopImpl>() );
93 }
94 stops.add((BusStopImpl)stop);
95 }
96
97
98
99
100
101
102 @Override
103 public String getColor() {
104 return color;
105 }
106
107
108
109
110 @Override
111 public void setColor(String color) {
112 this.color = color;
113 }
114
115
116
117
118 @Override
119 public BusRoutePath getPath() {
120 return path;
121 }
122
123
124
125
126 @Override
127 public void setPath(BusRoutePath path) {
128 this.path = path;
129 }
130
131
132 }