aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines/suma/BusStop.java
diff options
context:
space:
mode:
authorChristopher Baines <cbaines8@gmail.com>2012-01-25 13:53:22 +0000
committerChristopher Baines <cbaines8@gmail.com>2012-01-25 13:53:22 +0000
commitabcbffd80637a8aea379e6a774aa5747fd5cd0c7 (patch)
treee6912fb2fe412fd36b989af26be1051dbbf1a27e /src/net/cbaines/suma/BusStop.java
parentde2979e0f22264ada8326833bfb39746e9bf78cc (diff)
downloadsouthamptonuniversitymap-abcbffd80637a8aea379e6a774aa5747fd5cd0c7.tar
southamptonuniversitymap-abcbffd80637a8aea379e6a774aa5747fd5cd0c7.tar.gz
Lots of changes, need to regenerate the database, and add code to replace old databases with the current one.
Diffstat (limited to 'src/net/cbaines/suma/BusStop.java')
-rw-r--r--src/net/cbaines/suma/BusStop.java24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/net/cbaines/suma/BusStop.java b/src/net/cbaines/suma/BusStop.java
index 21f2dd9..5ed208f 100644
--- a/src/net/cbaines/suma/BusStop.java
+++ b/src/net/cbaines/suma/BusStop.java
@@ -19,25 +19,43 @@
package net.cbaines.suma;
+import java.util.HashSet;
+
import org.osmdroid.util.GeoPoint;
import com.j256.ormlite.field.DatabaseField;
+import com.j256.ormlite.field.ForeignCollectionField;
import com.j256.ormlite.table.DatabaseTable;
+/**
+ * Represents a physical bus stop on the map,
+ *
+ * @author Christopher Baines <cbaines8@gmail.com>
+ *
+ */
@DatabaseTable(tableName = "busstops")
public class BusStop extends POI {
public static final String DESCRIPTION_FIELD_NAME = "description";
public static final String BAY_FIELD_NAME = "bay";
public static final String ROUTES_FIELD_NAME = "bay";
+ /**
+ * Description e.g. "Bournemouth Rd os Asda S"
+ */
@DatabaseField(canBeNull = true)
public String description;
+
+ /**
+ * Unknown, "" for all UniLink stops
+ */
@DatabaseField(canBeNull = true)
public String bay;
- // Used to speed up accessing the relevent uni link routes for a bus stop, if == 0, this is not a uni link stop
- @DatabaseField(canBeNull = false)
- public byte routes;
+ /**
+ * Used to speed up accessing the relevent uni link routes for a bus stop, this is not a uni link stop
+ */
+ @ForeignCollectionField(eager = false)
+ public HashSet<BusRoute> routes;
public BusStop(String location, String description, String bay, GeoPoint point) {
this.id = location;