this.setCredits(credits);
this.setCredits(credits); this.setBeginDate(beginDate); if(endDate != null && endDate.before(beginDate)){ throw new DomainException("error.endDateBeforeBeginDate"); }
    public void edit(IFunction function, Date beginDate, Date endDate, Integer credits) {        this.setFunction(function);        this.setCredits(credits);        this.setEndDate(endDate);        this.setBeginDate(beginDate);    }