public static InfoPeriod newInfoFromDomain(OccupationPeriod period) { InfoPeriod infoPeriod = null; if (period != null) { infoPeriod = new InfoPeriod(); infoPeriod.copyFromDomain(period); } return infoPeriod; }
public Calendar endDateOfComposite() { Calendar end = this.endDate; InfoPeriod period = this.nextPeriod; while (period != null) { end = period.getEndDate(); period = period.getNextPeriod(); } return end; }
public void copyFromDomain(OccupationPeriod period) { if (period != null) { setStartDate(period.getStartDate()); setEndDate(period.getEndDate()); setIdInternal(period.getIdInternal()); if (period.getNextPeriod() != null) { InfoPeriod infoPeriod = new InfoPeriod(); infoPeriod.copyFromDomain(period.getNextPeriod()); setNextPeriod(infoPeriod); } } }