public Map<String, Boolean> getPrivacyLists(String username) {
        // If there are no privacy lists stored, this method is a no-op.
        if (!databaseContainsPrivacyLists.get()) {
            return Collections.emptyMap();
        }

        Map<String, Boolean> names = new HashMap<>();
        Connection con = null;
        PreparedStatement pstmt = null;
        ResultSet rs = null;
        try {
            con = DbConnectionManager.getConnection();
            pstmt = con.prepareStatement(LOAD_LIST_NAMES);
            pstmt.setString(1, username);
            rs = pstmt.executeQuery();
            while (rs.next()) {
                names.put(rs.getString(1), rs.getInt(2) == 1);
            }
        }
        catch (Exception e) {
            Log.error("Error loading names of privacy lists for username: " + username, e);
        }
        finally {
            DbConnectionManager.closeConnection(rs, pstmt, con);
        }
        return names;
    }
Returns the names of the existing privacy lists indicating which one is the
default privacy list associated to a user.

@param username the username of the user to get his privacy lists names.
@return the names of the existing privacy lists with a default flag.
xmppserver/src/main/java/org/jivesoftware/openfire/privacy/PrivacyListProvider.java