switch (rs.getByte(LEAF_CI_TYPE)) {
switch (type) {
    private static PendingDelete accumulateLeafNodes(PendingDelete info, Mailbox mbox, ResultSet rs) throws SQLException, ServiceException {        StoreManager sm = StoreManager.getInstance();        while (rs.next()) {            // first check to make sure we don't have a modify conflict            int revision = rs.getInt(LEAF_CI_MOD_CONTENT);            int modMetadata = rs.getInt(LEAF_CI_MOD_METADATA);            if (!mbox.checkItemChangeID(modMetadata, revision)) {                info.incomplete = true;                continue;            }            int id = rs.getInt(LEAF_CI_ID);            int size = rs.getInt(LEAF_CI_SIZE);            Integer item = new Integer(id);            info.itemIds.add(item);            info.size += size;            if (rs.getBoolean(LEAF_CI_IS_UNREAD))            	info.unreadIds.add(item);            int isMessage = 0;            switch (rs.getByte(LEAF_CI_TYPE)) {                case MailItem.TYPE_CONTACT:  info.contacts++;  break;                case MailItem.TYPE_MESSAGE:  isMessage = 1;    break;            }            // detect deleted virtual conversations            if (isMessage > 0 && rs.getBoolean(LEAF_CI_IS_NOT_CHILD))                info.itemIds.add(-id);            if (isMessage > 0 || size > 0) {                if (info.messages == null)                    info.messages = new HashMap<Integer, DbMailItem.LocationCount>();                Integer folderID = new Integer(rs.getInt(LEAF_CI_FOLDER_ID));                LocationCount count = info.messages.get(folderID);                if (count == null)                    info.messages.put(folderID, new LocationCount(isMessage, size));                else                    count.increment(isMessage, size);            }            boolean hasBlob = rs.getBoolean(LEAF_CI_HAS_BLOB);            if (hasBlob) {                short volumeId = rs.getShort(LEAF_CI_VOLUME_ID);                try {                    MailboxBlob mblob = sm.getMailboxBlob(mbox, id, revision, volumeId);                    if (mblob == null)                        sLog.error("missing blob for id: " + id + ", change: " + revision);                    else                        info.blobs.add(mblob);                } catch (Exception e1) { }            }            Integer indexId = new Integer(rs.getInt(LEAF_CI_INDEX_ID));            boolean indexed = !rs.wasNull();            if (indexed) {                if (info.sharedIndex == null)                    info.sharedIndex = new HashSet<Integer>();                boolean shared = rs.getBoolean(LEAF_CI_IS_COPIED);                if (!shared)  info.indexIds.add(indexId);                else          info.sharedIndex.add(indexId);            }        }        return info;    }