/** creates location object by drawing variable fields from database */ private GeoTrackerLocation cursorToLocation(Cursor cursor) { GeoTrackerLocation location = new GeoTrackerLocation(); location.setId(cursor.getLong(0)); // the first index of the table is the id location.setLongitude(cursor.getString(1)); // the second index of the table is the longitude location.setLatitude(cursor.getString(2)); // the third index of the table is the latitude location.setDate(cursor.getString(3)); // the fourth index of the table is the date return location; } // cursorToLocation