aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines/suma/RouteStops.java
diff options
context:
space:
mode:
authorChristopher Baines <cbaines8@gmail.com>2012-02-28 15:29:26 +0000
committerChristopher Baines <cbaines8@gmail.com>2012-02-28 15:29:26 +0000
commited7638698d439d75ada5120121a137f8e6f09bf8 (patch)
tree623e1211bb6b61200cb693ab0f9c61ec00716f68 /src/net/cbaines/suma/RouteStops.java
parentb5d0db004eaf72e9eeff0dfd7f612591d670b139 (diff)
downloadsouthamptonuniversitymap-ed7638698d439d75ada5120121a137f8e6f09bf8.tar
southamptonuniversitymap-ed7638698d439d75ada5120121a137f8e6f09bf8.tar.gz
Improved URI stuff, and formating.
Diffstat (limited to 'src/net/cbaines/suma/RouteStops.java')
-rw-r--r--src/net/cbaines/suma/RouteStops.java63
1 files changed, 33 insertions, 30 deletions
diff --git a/src/net/cbaines/suma/RouteStops.java b/src/net/cbaines/suma/RouteStops.java
index 29fb18c..2f6c00a 100644
--- a/src/net/cbaines/suma/RouteStops.java
+++ b/src/net/cbaines/suma/RouteStops.java
@@ -24,34 +24,37 @@ import com.j256.ormlite.table.DatabaseTable;
@DatabaseTable(tableName = "routestops")
public class RouteStops {
- public final static String STOP_ID_FIELD_NAME = "stop_id";
- public final static String ROUTE_ID_FIELD_NAME = "route_id";
- public final static String SEQUENCE_ID_FIELD_NAME = "sequence";
-
- /**
- * This id is generated by the database and set on the object when it is passed to the create method. An id is needed in case we need to update or delete
- * this object in the future.
- */
- @DatabaseField(generatedId = true)
- int id;
-
- @DatabaseField
- int sequence;
-
- // This is a foreign object which just stores the id from the User object in this table.
- @DatabaseField(foreign = true, columnName = STOP_ID_FIELD_NAME, indexName = "routestops_routestop_idx")
- BusStop busStop;
-
- // This is a foreign object which just stores the id from the Post object in this table.
- @DatabaseField(foreign = true, columnName = ROUTE_ID_FIELD_NAME, indexName = "routestops_routestop_idx")
- BusRoute busRoute;
-
- RouteStops() {
- }
-
- public RouteStops(BusStop stop, BusRoute route, int sequence) {
- this.busStop = stop;
- this.busRoute = route;
- this.sequence = sequence;
- }
+ public final static String STOP_ID_FIELD_NAME = "stop_id";
+ public final static String ROUTE_ID_FIELD_NAME = "route_id";
+ public final static String SEQUENCE_ID_FIELD_NAME = "sequence";
+
+ /**
+ * This id is generated by the database and set on the object when it is
+ * passed to the create method. An id is needed in case we need to update or
+ * delete this object in the future.
+ */
+ @DatabaseField(generatedId = true)
+ int id;
+
+ @DatabaseField
+ int sequence;
+
+ // This is a foreign object which just stores the id from the User object in
+ // this table.
+ @DatabaseField(foreign = true, columnName = STOP_ID_FIELD_NAME, indexName = "routestops_routestop_idx")
+ BusStop busStop;
+
+ // This is a foreign object which just stores the id from the Post object in
+ // this table.
+ @DatabaseField(foreign = true, columnName = ROUTE_ID_FIELD_NAME, indexName = "routestops_routestop_idx")
+ BusRoute busRoute;
+
+ RouteStops() {
+ }
+
+ public RouteStops(BusStop stop, BusRoute route, int sequence) {
+ this.busStop = stop;
+ this.busRoute = route;
+ this.sequence = sequence;
+ }
}