public static FuzzyDate valueOf(Integer year, Integer month, Integer day) { FuzzyDate fuzzyDate = new FuzzyDate(); fuzzyDate.year = year != null ? new Year(year) : null; fuzzyDate.month = month != null ? new Month(month) : null; fuzzyDate.day = day != null ? new Day(day) : null; return fuzzyDate; }
public FuzzyDate(org.orcid.jaxb.model.message.FuzzyDate other) { if (other == null) throw new IllegalArgumentException("Invalid init parameter"); if (other.getYear() != null) { this.year = new Year(); this.year.setValue(other.getYear().getValue()); } if (other.getMonth() != null) { this.month = new Month(); this.month.setValue(other.getMonth().getValue()); } if (other.getDay() != null) { this.day = new Day(); this.day.setValue(other.getDay().getValue()); } }
@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();