public static void addToLists(final Collection<Geocache> caches, final Map<String, Set<Integer>> cachesLists) {
        if (caches.isEmpty() || cachesLists.isEmpty()) {
            return;
        }
        withAccessLock(() -> {

            init();

            final SQLiteStatement add = PreparedStatement.ADD_TO_LIST.getStatement();

            database.beginTransaction();
            try {
                for (final Geocache cache : caches) {
                    final Set<Integer> lists = cachesLists.get(cache.getGeocode());
                    if (lists == null || lists.isEmpty()) {
                        continue;
                    }

                    for (final Integer listId : lists) {
                        add.bindLong(1, listId);
                        add.bindString(2, cache.getGeocode());
                        add.execute();
                    }

                }
                database.setTransactionSuccessful();
            } finally {
                database.endTransaction();
            }
        });
    }
@param listId  List to change
@param prevent value
@return Number of lists changed
main/src/main/java/cgeo/geocaching/storage/DataStore.java