for (int i = 0; i < projectList.size(); i++) { Project project = (Project) projectList.get(i);
List<Project> projectList = po.getIPersistentProject().readByCoordinatorAndNotProjectsCodes( coordinatorCode, projectCodes);  for (Project project : projectList) {
    public void run(String userView, String costCenter, String username, GregorianCalendar beginDate, GregorianCalendar endDate, String userNumber)            throws ExcepcaoPersistencia {        Person person = Person.readPersonByUsername(username);        if (person == null)            throw new IllegalArgumentException();                deletePastProjectAccesses(person);                IPersistentSuportOracle po = PersistentSuportOracle.getInstance();        Integer coordinatorCode = new Integer(userNumber);        Boolean isCostCenter = Boolean.FALSE;        RoleType roleType = RoleType.PROJECTS_MANAGER;        if (costCenter != null && !costCenter.equals("")) {            roleType = RoleType.INSTITUCIONAL_PROJECTS_MANAGER;            isCostCenter = Boolean.TRUE;        }        if (!hasProjectsManagerRole(person, roleType)) {            person.getPersonRoles().add(Role.getRoleByRoleType(roleType));        }                List<Integer> projectCodes = new ArrayList<Integer>();                List<ProjectAccess> accesses = ProjectAccess.getAllByPersonUsernameAndCoordinator(username, coordinatorCode, true);        for (ProjectAccess access : accesses) {            Integer keyProject = access.getKeyProject();                        if (! projectCodes.contains(keyProject)) {                projectCodes.add(keyProject);            }        }                List projectList = po.getIPersistentProject().readByCoordinatorAndNotProjectsCodes(coordinatorCode, projectCodes);        for (int i = 0; i < projectList.size(); i++) {            Project project = (Project) projectList.get(i);                        if (ProjectAccess.getByPersonAndProject(person, new Integer(project.getProjectCode())) == null) {                throw new IllegalArgumentException();            }                        ProjectAccess projectAccess = DomainFactory.makeProjectAccess();            projectAccess.setPerson(person);            projectAccess.setKeyProjectCoordinator(coordinatorCode);            projectAccess.setKeyProject(new Integer(project.getProjectCode()));            projectAccess.setBeginDate(beginDate);            projectAccess.setEndDate(endDate);            projectAccess.setCostCenter(isCostCenter);        }    }