aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines/suma/RouteStops.java
diff options
context:
space:
mode:
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;
+ }
}