@Override public void copyRelevantUpdatedHistoryElements(OrcidHistory existing, OrcidHistory updated) { Assert.notNull(updated, "The updated history is null"); Assert.notNull(existing, "The existing history is null"); if (updated.isClaimed() && !existing.isClaimed()) { existing.setClaimed(new Claimed(true)); } if (existing.getCompletionDate() == null && updated.getCompletionDate() != null) { existing.setCompletionDate(updated.getCompletionDate()); } // TODO: There may be some others that need to be added to this. }
history.setCompletionDate(new CompletionDate(toXMLGregorianCalendar(profileEntity.getCompletedDate())));