if(person.getCauseOfDeath() != null && person.getCauseOfDeathNonCoded() != null) { errors.rejectValue("causeOfDeath", "Person.dead.shouldHaveOnlyOneCauseOfDeathOrCauseOfDeathNonCodedSet"); else if(person.getCauseOfDeath() == null && person.getCauseOfDeathNonCoded() == null) { errors.rejectValue("causeOfDeath", "Person.dead.causeOfDeathAndCauseOfDeathNonCodedNull");
deathDate = person.getDeathDate(); causeOfDeath = person.getCauseOfDeath(); causeOfDeathNonCoded = person.getCauseOfDeathNonCoded();
@Override public void validateFullRepresentation() throws Exception { super.validateFullRepresentation(); assertPropEquals("causeOfDeathNonCoded", getObject().getCauseOfDeathNonCoded()); }