info.itemIds.add(folderId);
info.itemIds.add(folder.getType(), folderId);
    public static PendingDelete getLeafNodes(Folder folder) throws ServiceException {    	Mailbox mbox = folder.getMailbox();        PendingDelete info = new PendingDelete();        int folderId = folder.getId();        Connection conn = mbox.getOperationConnection();        PreparedStatement stmt = null;        ResultSet rs = null;        try {            stmt = conn.prepareStatement("SELECT " + LEAF_NODE_FIELDS +                    " FROM " + getMailItemTableName(folder) +                    " WHERE " + IN_THIS_MAILBOX_AND + "folder_id = ? AND type NOT IN " + FOLDER_TYPES);            int pos = 1;            if (!DebugConfig.disableMailboxGroup)                stmt.setInt(pos++, mbox.getId());            stmt.setInt(pos++, folderId);            rs = stmt.executeQuery();            info.rootId = folderId;            info.size   = 0;            accumulateLeafNodes(info, mbox, rs);            // make sure that the folder is in the list of deleted item ids            info.itemIds.add(folderId);            return info;        } catch (SQLException e) {        	throw ServiceException.FAILURE("fetching list of items within item " + folder.getId(), e);        } finally {        	DbPool.closeResults(rs);            DbPool.closeStatement(stmt);        }    }