public Object run(String userName) throws FenixServiceException { List result = new ArrayList(); try { ISuportePersistente persistentSuport = SuportePersistenteOJB.getInstance(); IStudent student = persistentSuport.getIPersistentStudent().readByUsername(userName);
public Object run(String userName) throws ExcepcaoPersistencia { final ISuportePersistente persistentSuport = SuportePersistenteOJB.getInstance(); final IPersistentStudent persistentStudent = persistentSuport.getIPersistentStudent(); final IFrequentaPersistente persistentAttends = persistentSuport.getIFrequentaPersistente(); final IPersistentStudentTestQuestion persistentStudentTestQuestion = persistentSuport.getIPersistentStudentTestQuestion();
    public Object run(String userName) throws FenixServiceException {        List result = new ArrayList();        try {            ISuportePersistente persistentSuport = SuportePersistenteOJB.getInstance();            IStudent student = persistentSuport.getIPersistentStudent().readByUsername(userName);            List attendList = persistentSuport.getIFrequentaPersistente().readByStudentNumber(                    student.getNumber());            Iterator it = attendList.iterator();            while (it.hasNext()) {                IFrequenta attend = (Frequenta) it.next();                IExecutionCourse executionCourse = attend.getDisciplinaExecucao();                if (persistentSuport.getIPersistentStudentTestQuestion()                        .countStudentTestByStudentAndExecutionCourse(executionCourse, student) != 0)                    result.add(Cloner.get(executionCourse));            }        } catch (ExcepcaoPersistencia e) {            throw new FenixServiceException(e);        }        return result;    }