try { sp = SuportePersistenteOJB.getInstance(); IPersistentTeacher persistentTeacher = sp.getIPersistentTeacher();
if (argumentos==null) { return false; } 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();
	private boolean isResponsibleForExecutionCourse(IUserView id, Object[] argumentos) {		InfoExecutionCourse infoExecutionCourse =(InfoExecutionCourse) argumentos[0];		IDisciplinaExecucao executionCourse = Cloner.copyInfoExecutionCourse2ExecutionCourse(infoExecutionCourse);		ISuportePersistente sp;		IResponsibleFor responsibleFor =null;		try {			sp = SuportePersistenteOJB.getInstance();			IPersistentTeacher persistentTeacher = sp.getIPersistentTeacher();			ITeacher teacher=persistentTeacher.readTeacherByUsernamePB(id.getUtilizador());			IPersistentResponsibleFor persistentResponsibleFor = sp.getIPersistentResponsibleFor();			responsibleFor =persistentResponsibleFor.readByTeacherAndExecutionCoursePB(teacher,executionCourse);					} catch (ExcepcaoPersistencia e) {			return false;		}		if (responsibleFor==null){			return false;		}		else {			return true;		}			}