From 07bd9e8e8797a0ee438e1026824ac253c168ff0e Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 7 Mar 2012 23:04:39 +0000 Subject: Got the config file loading working for ormlite. --- src/net/cbaines/suma/POI.java | 82 +++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 41 deletions(-) (limited to 'src/net/cbaines/suma/POI.java') diff --git a/src/net/cbaines/suma/POI.java b/src/net/cbaines/suma/POI.java index 485845c..c84f90e 100644 --- a/src/net/cbaines/suma/POI.java +++ b/src/net/cbaines/suma/POI.java @@ -25,54 +25,54 @@ import com.j256.ormlite.field.DataType; import com.j256.ormlite.field.DatabaseField; public abstract class POI { - public static final String BUS_STOP = "busstop"; - public static final String BUILDING = "building"; - public static final String WAYPOINT = "waypoint"; - public static final String SITE = "site"; + public static final String BUS_STOP = "busstop"; + public static final String BUILDING = "building"; + public static final String WAYPOINT = "waypoint"; + public static final String SITE = "site"; - public static final String ID_FIELD_NAME = "id"; - public static final String POINT_FIELD_NAME = "point"; + public static final String ID_FIELD_NAME = "id"; + public static final String POINT_FIELD_NAME = "point"; - POI() { - } + POI() { + } - public POI(String id, GeoPoint point) { - this.id = id; - this.point = point; - } + public POI(String id, GeoPoint point) { + this.id = id; + this.point = point; + } - @DatabaseField(dataType = DataType.SERIALIZABLE, canBeNull = false) - public GeoPoint point; + @DatabaseField(dataType = DataType.SERIALIZABLE, canBeNull = false) + public GeoPoint point; - @DatabaseField(id = true) - public String id; + @DatabaseField(id = true) + public String id; - public int distTo = -1; // Used by the comparator to store distances, then later by the gui to display them. + public int distTo = -1; // Used by the comparator to store distances, then later by the gui to display them. - public String type; + public String type; - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((id == null) ? 0 : id.hashCode()); - return result; - } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((id == null) ? 0 : id.hashCode()); + return result; + } - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - POI other = (POI) obj; - if (id == null) { - if (other.id != null) - return false; - } else if (!id.equals(other.id)) - return false; - return true; - } + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + POI other = (POI) obj; + if (id == null) { + if (other.id != null) + return false; + } else if (!id.equals(other.id)) + return false; + return true; + } } -- cgit v1.2.3