HashMap result = new HashMap();
    public static Map getMailboxes(Connection conn) throws ServiceException {        PreparedStatement stmt = null;        ResultSet rs = null;        HashMap result = new HashMap();        try {            stmt = conn.prepareStatement("SELECT id, account_id FROM mailbox");            rs = stmt.executeQuery();            while (rs.next())                result.put(rs.getString(2), new Integer(rs.getInt(1)));            return result;        } catch (SQLException e) {            throw ServiceException.FAILURE("fetching mailboxes", e);        } finally {            DbPool.closeResults(rs);            DbPool.closeStatement(stmt);        }    }