aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/cgData.java
diff options
context:
space:
mode:
authorkoem <koem@petoria.de>2011-10-08 16:07:02 +0200
committerkoem <koem@petoria.de>2011-10-08 16:07:02 +0200
commit6e950c529ab6d1df27841e88b4237180a2465b79 (patch)
treea46527355078d697536ee6a7ab79d5e708ade2d4 /main/src/cgeo/geocaching/cgData.java
parent9731ffa193c81c77ad64cb06c7574098113fd316 (diff)
downloadcgeo-6e950c529ab6d1df27841e88b4237180a2465b79.zip
cgeo-6e950c529ab6d1df27841e88b4237180a2465b79.tar.gz
cgeo-6e950c529ab6d1df27841e88b4237180a2465b79.tar.bz2
always use WaypointType
Diffstat (limited to 'main/src/cgeo/geocaching/cgData.java')
-rw-r--r--main/src/cgeo/geocaching/cgData.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/cgData.java b/main/src/cgeo/geocaching/cgData.java
index 86d6b60..6d07c64 100644
--- a/main/src/cgeo/geocaching/cgData.java
+++ b/main/src/cgeo/geocaching/cgData.java
@@ -1,6 +1,7 @@
package cgeo.geocaching;
import cgeo.geocaching.enumerations.CacheSize;
+import cgeo.geocaching.enumerations.WaypointType;
import cgeo.geocaching.files.LocalStorage;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.Geopoint.MalformedCoordinateException;
@@ -1412,7 +1413,7 @@ public class cgData {
values.clear();
values.put("geocode", geocode);
values.put("updated", timeStamp);
- values.put("type", oneWaypoint.type);
+ values.put("type", oneWaypoint.typee != null ? oneWaypoint.typee.id : null);
values.put("prefix", oneWaypoint.getPrefix());
values.put("lookup", oneWaypoint.lookup);
values.put("name", oneWaypoint.name);
@@ -1498,7 +1499,7 @@ public class cgData {
ContentValues values = new ContentValues();
values.put("geocode", geocode);
values.put("updated", System.currentTimeMillis());
- values.put("type", waypoint.type);
+ values.put("type", waypoint.typee != null ? waypoint.typee.id : null);
values.put("prefix", waypoint.getPrefix());
values.put("lookup", waypoint.lookup);
values.put("name", waypoint.name);
@@ -2201,7 +2202,7 @@ public class cgData {
cgWaypoint waypoint = new cgWaypoint();
waypoint.id = (int) cursor.getInt(cursor.getColumnIndex("_id"));
waypoint.geocode = (String) cursor.getString(cursor.getColumnIndex("geocode"));
- waypoint.type = (String) cursor.getString(cursor.getColumnIndex("type"));
+ waypoint.typee = WaypointType.FIND_BY_ID.get((String) cursor.getString(cursor.getColumnIndex("type")));
waypoint.setPrefix((String) cursor.getString(cursor.getColumnIndex("prefix")));
waypoint.lookup = (String) cursor.getString(cursor.getColumnIndex("lookup"));
waypoint.name = (String) cursor.getString(cursor.getColumnIndex("name"));