if (professorship==null){
try {  sp = SuportePersistenteOJB.getInstance(); IDisciplinaExecucaoPersistente persistentExecutionCourse = sp.getIDisciplinaExecucaoPersistente(); if (argumentos[0] instanceof InfoExecutionCourse) { infoExecutionCourse = (InfoExecutionCourse) argumentos[0]; executionCourse = Cloner.copyInfoExecutionCourse2ExecutionCourse(infoExecutionCourse); } else { executionCourse = (IDisciplinaExecucao) persistentExecutionCourse.readByOId(new DisciplinaExecucao((Integer) argumentos[0])); }  IPersistentTeacher persistentTeacher = sp.getIPersistentTeacher(); ITeacher teacher = persistentTeacher.readTeacherByUsernamePB(id.getUtilizador()); IPersistentProfessorship persistentProfessorship = sp.getIPersistentProfessorship(); professorship = persistentProfessorship.readByTeacherAndExecutionCoursePB(teacher, executionCourse);  } catch (Exception e) {
	private boolean lecturesExecutionCourse(IUserView id, Object[] argumentos) {		InfoExecutionCourse infoExecutionCourse =(InfoExecutionCourse) argumentos[0];		IDisciplinaExecucao executionCourse = Cloner.copyInfoExecutionCourse2ExecutionCourse(infoExecutionCourse);		ISuportePersistente sp;		IProfessorship professorship =null;		try {			sp = SuportePersistenteOJB.getInstance();			IPersistentTeacher persistentTeacher = sp.getIPersistentTeacher();			ITeacher teacher=persistentTeacher.readTeacherByUsernamePB(id.getUtilizador());			IPersistentProfessorship persistentProfessorship = sp.getIPersistentProfessorship();			professorship =persistentProfessorship.readByTeacherAndExecutionCoursePB(teacher,executionCourse);								} catch (ExcepcaoPersistencia e) {			return false;		}		if (professorship==null){			return false;		}		else {			return true;		}			}