public static void writeTombstone(Mailbox mbox, PendingDelete info) throws ServiceException {
public static void writeTombstone(Mailbox mbox, MailItem.TypedIdList tombstones) throws ServiceException { if (tombstones == null || tombstones.isEmpty()) return;
    public static void writeTombstone(Mailbox mbox, PendingDelete info) throws ServiceException {        Connection conn = mbox.getOperationConnection();        PreparedStatement stmt = null;        try {            StringBuilder ids = null;            if (info != null) {                if (info.itemIds == null || info.itemIds.size() == 0)                    return;                ids = new StringBuilder();                for (int i = 0; i < info.itemIds.size(); i++)                    ids.append(i == 0 ? "" : ",").append(info.itemIds.get(i));            }            stmt = conn.prepareStatement("INSERT INTO " + getTombstoneTableName(mbox) + "(" +                    (!DebugConfig.disableMailboxGroup ? "mailbox_id, " : "") +                    "sequence, date, ids) VALUES (" +                    (!DebugConfig.disableMailboxGroup ? "?, " : "") +                    "?,?,?)");            int pos = 1;            if (!DebugConfig.disableMailboxGroup)                stmt.setInt(pos++, mbox.getId());            stmt.setInt(pos++, mbox.getOperationChangeID());            stmt.setInt(pos++, mbox.getOperationTimestamp());            if (ids != null)                stmt.setString(pos++, ids.toString());            else                stmt.setNull(pos++, Types.VARCHAR);            stmt.executeUpdate();        } catch (SQLException e) {            if (info == null)                throw ServiceException.FAILURE("writing change sequence checkpoint", e);            else                throw ServiceException.FAILURE("writing tombstones for item(s): " + info.itemIds, e);        } finally {            DbPool.closeStatement(stmt);        }    }