data.modMetadata = mbox.getOperationChangeID(); data.modContent = mbox.getOperationChangeID();
data.contentChanged(mbox);
    static Appointment create(int id, Folder folder, String tags, String uid,            ParsedMessage pm, Invite firstInvite) throws ServiceException {        Mailbox mbox = folder.getMailbox();        List invites = new ArrayList();        invites.add(firstInvite);        UnderlyingData data = new UnderlyingData();        Recurrence.IRecurrence recur = firstInvite.getRecurrence();        long startTime, endTime;        if (recur != null) {            startTime = recur.getStartTime().getUtcTime();            endTime = recur.getEndTime().getUtcTime();        } else {            startTime = firstInvite.getStartTime().getUtcTime();            endTime = startTime;            if (firstInvite.getEndTime() != null) {                endTime = firstInvite.getEndTime().getUtcTime();            } else {                if (firstInvite.getDuration() != null) {                    endTime = firstInvite.getDuration().addToTime(startTime);                }            }        }        data.id = id;        data.type = TYPE_APPOINTMENT;        data.folderId = folder.getId();        data.indexId = id;        data.date = mbox.getOperationTimestamp();        data.tags = Tag.tagsToBitmask(tags);        data.sender = uid;        data.metadata = encodeMetadata(uid, startTime, endTime, recur,invites, firstInvite.getTimeZoneMap());        data.modMetadata = mbox.getOperationChangeID();        data.modContent = mbox.getOperationChangeID();        DbMailItem.create(mbox, data);        Appointment appt = new Appointment(mbox, data);        appt.createBlob(pm, firstInvite);        appt.finishCreation(null);        DbMailItem.addToAppointmentTable(appt);        return appt;    }