@Override public boolean isChanged(final Object source, final Object target) { final Person p1 = (Person) source; final Person p2 = (Person) target; final boolean equal = p1.getFirstname().equals(p2.getFirstname()) && p1.getLastname().equals(p2.getLastname()); return !equal; }
public Person copyBean(final Object source, final Object target) { final Person from = source != null ? (Person) source : createWorkingCopy(); final Person to = target != null ? (Person) target : createWorkingCopy(); to.setFirstname(from.getFirstname()); to.setLastname(from.getLastname()); return to; }