" WHERE " + (DebugConfig.enableMailboxGroup ? "mailbox_id = ? AND " : "") + "id = ?");
" WHERE " + IN_THIS_MAILBOX_AND + "id = ?");
    public static void persistCounts(MailItem item, String metadata) throws ServiceException {        Mailbox mbox = item.getMailbox();        Connection conn = mbox.getOperationConnection();        PreparedStatement stmt = null;        try {            stmt = conn.prepareStatement("UPDATE " + getMailItemTableName(item) +                    " SET size = ?, unread = ?, metadata = ?, mod_metadata = ?, change_date = ?, mod_content = ?" +                    " WHERE " +                    (DebugConfig.enableMailboxGroup ? "mailbox_id = ? AND " : "") +                    "id = ?");            int pos = 1;            stmt.setInt(pos++, item.getSize());            stmt.setInt(pos++, item.getUnreadCount());            stmt.setString(pos++, checkTextLength(metadata));            stmt.setInt(pos++, mbox.getOperationChangeID());            stmt.setInt(pos++, mbox.getOperationTimestamp());            stmt.setInt(pos++, item.getSavedSequence());            if (DebugConfig.enableMailboxGroup)                stmt.setInt(pos++, mbox.getId());            stmt.setInt(pos++, item.getId());            stmt.executeUpdate();        } catch (SQLException e) {            throw ServiceException.FAILURE("writing metadata for mailbox " + item.getMailboxId() + ", item " + item.getId(), e);        } finally {            DbPool.closeStatement(stmt);        }    }