diff options
author | Christopher Baines <cbaines8@gmail.com> | 2012-03-06 14:46:01 +0000 |
---|---|---|
committer | Christopher Baines <cbaines8@gmail.com> | 2012-03-06 14:46:01 +0000 |
commit | a722eac92e7154563bd144ad91b092d23dae8f2a (patch) | |
tree | 4bcd0901fe5fe9748c797119eec5045fbb33efcd /src/net/cbaines/suma/Bus.java | |
parent | 5dbed3a0fe85f0ed2a2763be0912f109bdee6c20 (diff) | |
download | southamptonuniversitymap-a722eac92e7154563bd144ad91b092d23dae8f2a.tar southamptonuniversitymap-a722eac92e7154563bd144ad91b092d23dae8f2a.tar.gz |
Basic searchable stuff.
Diffstat (limited to 'src/net/cbaines/suma/Bus.java')
-rw-r--r-- | src/net/cbaines/suma/Bus.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/cbaines/suma/Bus.java b/src/net/cbaines/suma/Bus.java index 865384f..34e20a6 100644 --- a/src/net/cbaines/suma/Bus.java +++ b/src/net/cbaines/suma/Bus.java @@ -35,9 +35,6 @@ public class Bus { final static String ROUTE_FIELD_NAME = "route"; final static String DIRECTION_FIELD_NAME = "direction"; - @DatabaseField(generatedId = true) - int gid; - /** * The identification number of the bus. */ @@ -115,7 +112,7 @@ public class Bus { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + gid; + result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @@ -128,7 +125,10 @@ public class Bus { if (getClass() != obj.getClass()) return false; Bus other = (Bus) obj; - if (id != other.id) + if (id == null) { + if (other.id != null) + return false; + } else if (!id.equals(other.id)) return false; return true; } |