stmt.setInt(11, item.getSavedSequence()); stmt.setInt(12, item.getId());
stmt.setInt(11, mbox.getOperationTimestamp()); stmt.setInt(12, item.getSavedSequence()); stmt.setInt(13, item.getId());
    public static void saveData(MailItem item, long size, int flags, String sender, String metadata)    throws ServiceException {        Mailbox mbox = item.getMailbox();        Connection conn = mbox.getOperationConnection();        PreparedStatement stmt = null;        try {            stmt = conn.prepareStatement("UPDATE " + getMailItemTableName(item) +                    " SET type = ?, parent_id = ?, date = ?, size = ?, blob_digest = ?, flags = ?," +                    "     sender = ?, subject = ?, metadata = ?, mod_metadata = ?, mod_content = ?" +                    " WHERE id = ?");            stmt.setByte(1, item.getType());            if (item.getParentId() <= 0)                stmt.setNull(2, Types.INTEGER);            else            	stmt.setInt(2, item.getParentId());            stmt.setInt(3, (int) (item.getDate() / 1000));            stmt.setInt(4, (int) size);            stmt.setString(5, item.getDigest());            stmt.setInt(6, flags);            stmt.setString(7, sender);            stmt.setString(8, item.getSubject());            stmt.setString(9, metadata);            stmt.setInt(10, mbox.getOperationChangeID());            stmt.setInt(11, item.getSavedSequence());            stmt.setInt(12, item.getId());            stmt.executeUpdate();                        // Update the flagset cache.  Assume that the item's in-memory            // data has already been updated.            TagsetCache flagsets = getFlagsetCache(conn, mbox.getId());            flagsets.addTagset(flags);        } catch (SQLException e) {            throw ServiceException.FAILURE("rewriting row data for mailbox " + item.getMailboxId() + ", item " + item.getId(), e);        } finally {            DbPool.closeStatement(stmt);        }    }