public static int save(final GeocacheFilter filter) {
            return withAccessLock(() -> {
                delete(filter.getName());
                final ContentValues values = new ContentValues();
                values.put("name", filter.getName());
                values.put("treeconfig", filter.toConfig());
                return (int) database.insert(dbTableFilters, null, values);
            });
        }
Saves using UPSERT on NAME (if filter with same name exists, it deleted before.  otherwise new one is created)
main/src/main/java/cgeo/geocaching/storage/DataStore.java