if(year.equals("2002/2003") && gratuitySituation.getTransactionListCount() == 0){ gratuitySituation.removeEmployee(); gratuitySituation.removeGratuityValues(); gratuitySituation.removeStudentCurricularPlan(); this.gratuitySituationsToDelete.add(gratuitySituation); continue; }
    public void run(String year) throws ExcepcaoPersistencia {        gratuitySituationsToDelete = new HashSet<IGratuitySituation>();        ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport();        IExecutionYear executionYear = readExecutionYear(year, sp);        // read master degree and specialization execution degrees        Collection<IExecutionDegree> executionDegrees = executionYear                .getExecutionDegreesByType(DegreeType.MASTER_DEGREE);        for (IExecutionDegree executionDegree : executionDegrees) {            IGratuityValues gratuityValues = executionDegree.getGratuityValues();            if (gratuityValues == null) {                continue;            }            this.firstYear = executionDegree.isFirstYear();            List<IStudentCurricularPlan> studentCurricularPlans = executionDegree                    .getDegreeCurricularPlan().getStudentCurricularPlans();            for (IStudentCurricularPlan studentCurricularPlan : studentCurricularPlans) {                IGratuitySituation gratuitySituation = studentCurricularPlan                        .getGratuitySituationByGratuityValues(gratuityValues);                if (gratuitySituation == null) {                    createGratuitySituation(gratuityValues, studentCurricularPlan);                } else {                    updateGratuitySituation(gratuitySituation);                }            }        }        for (IGratuitySituation gratuitySituationToDelete : this.gratuitySituationsToDelete) {            sp.getIPersistentObject().deleteByOID(GratuitySituation.class,                    gratuitySituationToDelete.getIdInternal());        }    }