IEnrolment enrollment = (IEnrolment) enrollmentDAO.readByOID(Enrolment.class, enrollmentID);
IEnrollment enrollment = (IEnrollment) enrollmentDAO.readByOID(Enrolment.class, enrollmentID);
	protected Object execute(Object object) throws FenixServiceException	{		List idsOfChosenEnrollments = (List) object;				try		{			ISuportePersistente persistenceDAO = SuportePersistenteOJB.getInstance();			IPersistentEnrolment enrollmentDAO = persistenceDAO.getIPersistentEnrolment();			IPersistentEnrolmentEvaluation enrolmentEvaluationDAO = persistenceDAO.getIPersistentEnrolmentEvaluation();			IPersistentEnrolmentEquivalence enrollmentEquivalenceDAO = persistenceDAO.getIPersistentEnrolmentEquivalence();			IPersistentEquivalentEnrolmentForEnrolmentEquivalence equivalentEnrollmentForEnrollmentEquivalenceDAO = persistenceDAO				.getIPersistentEquivalentEnrolmentForEnrolmentEquivalence();			for (int i = 0; i < idsOfChosenEnrollments.size(); i++)			{				Integer enrollmentID = (Integer) idsOfChosenEnrollments.get(i);								IEnrolment enrollment = (IEnrolment) enrollmentDAO.readByOID(Enrolment.class, enrollmentID);				if (enrollment != null)				{					IEnrolmentEquivalence enrollmentEquivalence = enrollmentEquivalenceDAO.readByEnrolment(enrollment);					if (enrollmentEquivalence != null)					{						List equivalentEnrollmentsForEnrollmentEquivalence = equivalentEnrollmentForEnrollmentEquivalenceDAO							.readByEnrolmentEquivalence(enrollmentEquivalence);						if ((equivalentEnrollmentsForEnrollmentEquivalence != null)							&& (!equivalentEnrollmentsForEnrollmentEquivalence.isEmpty()))						{							for (int j = 0; j < equivalentEnrollmentsForEnrollmentEquivalence.size(); j++)							{								IEquivalentEnrolmentForEnrolmentEquivalence equivalentEnrolmentForEnrolmentEquivalence =									(IEquivalentEnrolmentForEnrolmentEquivalence) equivalentEnrollmentsForEnrollmentEquivalence									.get(j);																equivalentEnrollmentForEnrollmentEquivalenceDAO.deleteByOID(									EquivalentEnrolmentForEnrolmentEquivalence.class, equivalentEnrolmentForEnrolmentEquivalence										.getIdInternal());							}						}												enrollmentEquivalenceDAO.deleteByOID(EnrolmentEquivalence.class, enrollmentEquivalence.getIdInternal());					}										for (int k = 0; k < enrollment.getEvaluations().size(); k++)					{						IEnrolmentEvaluation enrollmentEvaluation = (IEnrolmentEvaluation) enrollment.getEvaluations().get(k);						enrolmentEvaluationDAO.deleteByOID(EnrolmentEvaluation.class, enrollmentEvaluation.getIdInternal());					}					enrollmentDAO.deleteByOID(Enrolment.class, enrollment.getIdInternal());				}			}		} catch (ExcepcaoPersistencia e)		{			throw new FenixServiceException(e);		}		return null;	}