public FuzzyDate toFuzzyDate() { FuzzyDate fd = new FuzzyDate(); if (!PojoUtil.isEmpty(this.getDay())) fd.setDay(new Day(new Integer(this.getDay()))); if (!PojoUtil.isEmpty(this.getMonth())) fd.setMonth(new Month(new Integer(this.getMonth()))); if (!PojoUtil.isEmpty(this.getYear())) fd.setYear(new Year(new Integer(this.getYear()))); return fd; }
public org.orcid.jaxb.model.v3.rc2.common.FuzzyDate toV3FuzzyDate() { org.orcid.jaxb.model.v3.rc2.common.FuzzyDate fd = new org.orcid.jaxb.model.v3.rc2.common.FuzzyDate(); if (!PojoUtil.isEmpty(this.getDay())) fd.setDay(new org.orcid.jaxb.model.v3.rc2.common.Day(new Integer(this.getDay()))); if (!PojoUtil.isEmpty(this.getMonth())) fd.setMonth(new org.orcid.jaxb.model.v3.rc2.common.Month(new Integer(this.getMonth()))); if (!PojoUtil.isEmpty(this.getYear())) fd.setYear(new org.orcid.jaxb.model.v3.rc2.common.Year(new Integer(this.getYear()))); return fd; }
@Override public void mapBtoA(EndDateEntity entity, FuzzyDate fuzzyDate, MappingContext context) { if (entity.getYear() != null) { fuzzyDate.setYear(new Year(entity.getYear())); } else { fuzzyDate.setYear(null); } if (entity.getMonth() != null) { fuzzyDate.setMonth(new Month(entity.getMonth())); } else { fuzzyDate.setMonth(null); } if (entity.getDay() != null) { fuzzyDate.setDay(new Day(entity.getDay())); } else { fuzzyDate.setDay(null); } } }).register();
@Override public void mapBtoA(StartDateEntity entity, FuzzyDate fuzzyDate, MappingContext context) { if (entity.getYear() != null) { fuzzyDate.setYear(new Year(entity.getYear())); } else { fuzzyDate.setYear(null); } if (entity.getMonth() != null) { fuzzyDate.setMonth(new Month(entity.getMonth())); } else { fuzzyDate.setMonth(null); } if (entity.getDay() != null) { fuzzyDate.setDay(new Day(entity.getDay())); } else { fuzzyDate.setDay(null); } } }).register();