if(endDate != null && endDate.before(beginDate)){ throw new DomainException("error.endDateBeforeBeginDate"); }
    public void edit(String functionName, Date beginDate, Date endDate, FunctionType type, IUnit unit,            IFunction parentInherentFunction) {               this.setName(functionName);        this.setBeginDate(beginDate);        this.setEndDate(endDate);        this.setType(type);        this.setUnit(unit);        this.setParentInherentFunction(parentInherentFunction);    }