while(roleIdsToProcess.size()>0) {
String parentId = roleIdsToProcess.poll();
hu = new HibernateUtil(Role.class);
hu.setQuery("from com.dotmarketing.business.Role where id = ?");
hu.setParam(parentId);
Role parentRole = (Role)hu.load();
rolesToUpdate.add(parentRole);
List<Role> toPopulate = new ArrayList<Role>();
toPopulate.add(parentRole);
try {
populatChildrenForRoles(toPopulate);