private static void saveInventoryWithoutTransaction(final String geocode, final List<Trackable> trackables) {
        if (geocode != null) {
            database.delete(dbTableTrackables, "geocode = ?", new String[]{geocode});
        }

        if (CollectionUtils.isNotEmpty(trackables)) {
            final ContentValues values = new ContentValues();
            final long timeStamp = System.currentTimeMillis();
            for (final Trackable trackable : trackables) {
                final String tbCode = trackable.getGeocode();
                if (StringUtils.isNotBlank(tbCode)) {
                    database.delete(dbTableTrackables, "tbcode = ?", new String[]{tbCode});
                }
                values.clear();
                if (geocode != null) {
                    values.put("geocode", geocode);
                }
                values.put("updated", timeStamp);
                values.put("tbcode", tbCode);
                values.put("guid", trackable.getGuid());
                values.put("title", trackable.getName());
                values.put("owner", trackable.getOwner());
                final Date releasedDate = trackable.getReleased();
                if (releasedDate != null) {
                    values.put("released", releasedDate.getTime());
                } else {
                    values.put("released", 0L);
                }
                values.put("goal", trackable.getGoal());
                values.put("description", trackable.getDetails());

                final Date logDate = trackable.getLogDate();
                if (logDate != null) {
                    values.put("log_date", logDate.getTime());
                } else {
                    values.put("log_date", 0L);
                }
                final LogType logType = trackable.getLogType();
                if (logType != null) {
                    values.put("log_type", trackable.getLogType().id);
                } else {
                    values.put("log_type", 0);
                }
                values.put("log_guid", trackable.getLogGuid());

                database.insert(dbTableTrackables, null, values);

                saveLogsWithoutTransaction(tbCode, trackable.getLogs(), true);
            }
        }
    }
Retrieve coordinates from a Cursor

@param cursor   a Cursor representing a row in the database
@param indexLat index of the latitude column
@param indexLon index of the longitude column
@return the coordinates, or null if latitude or longitude is null or the coordinates are invalid
main/src/main/java/cgeo/geocaching/storage/DataStore.java