aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines/suma/Bus.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/cbaines/suma/Bus.java')
-rw-r--r--src/net/cbaines/suma/Bus.java10
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;
}