if(student == null){ throw new FenixServiceException("errors.invalid.student-number"); }
    public void run(Integer teacherID, Integer executionPeriodID, final Integer studentNumber,            Double percentage, AdviseType adviseType) throws ExcepcaoPersistencia {        ISuportePersistente persistentSupport = PersistenceSupportFactory.getDefaultPersistenceSupport();        ITeacher teacher = (ITeacher) persistentSupport.getIPersistentTeacher().readByOID(Teacher.class,                teacherID);        IExecutionPeriod executionPeriod = (IExecutionPeriod) persistentSupport                .getIPersistentExecutionPeriod().readByOID(ExecutionPeriod.class, executionPeriodID);                List<IStudent> students = persistentSupport.getIPersistentStudent().readAll();        IStudent student = (IStudent) CollectionUtils.find(students, new Predicate(){            public boolean evaluate(Object arg0) {                IStudent tempStudent = (IStudent) arg0;                 return tempStudent.getNumber().equals(studentNumber);            }});                ITeacherService teacherService = teacher.getTeacherServiceByExecutionPeriod(executionPeriod);        if(teacherService == null){            teacherService = DomainFactory.makeTeacherService(teacher,executionPeriod);        }        List<IAdvise> advises = student.getAdvisesByTeacher(teacher);        IAdvise advise = null;        if(advises == null || advises.isEmpty()){            advise = DomainFactory.makeAdvise(teacher,student,adviseType,executionPeriod,executionPeriod);        } else {            advise = advises.iterator().next();        }        ITeacherAdviseService teacherAdviseService = advise.getTeacherAdviseServiceByExecutionPeriod(executionPeriod);                if(teacherAdviseService == null){            teacherAdviseService = DomainFactory.makeTeacherAdviseService(teacherService,advise,percentage);        } else {            teacherAdviseService.updatePercentage(percentage);        }    }