@Test public void merge() { final String secondDateTime = "2020-12-03T10:15:30+01:00[Europe/Paris]"; final SharedToUser secondUser = SharedToUser.builder() .id(new SharedToUserPK(2L, 2L)) .searchId(2L) .userId(2L) .canEdit(false) .modifiedDate(ZonedDateTime.parse(secondDateTime)) .sharedDate(ZonedDateTime.parse(secondDateTime)) .build(); secondUser.merge(firstUser); assertThat(secondUser.getId().getSearchId(), is(2L)); assertThat(secondUser.getId().getUserId(), is(2L)); assertThat(secondUser.getCanEdit(), is(false)); assertThat(secondUser.getModifiedDate(), is(ZonedDateTime.parse(secondDateTime))); assertThat(secondUser.getSharedDate(), is(ZonedDateTime.parse(firstDateTime))); }
public void merge(final SharedToUser other) { if (other != null) { sharedDate = other.sharedDate == null ? sharedDate : other.sharedDate; } }
SharedToUser { public void merge(final SharedToUser other) { if (other != null) { sharedDate = other.sharedDate == null ? sharedDate : other.sharedDate; } } }
SharedToUser { public void merge(final SharedToUser other) { if (other != null) { sharedDate = other.sharedDate == null ? sharedDate : other.sharedDate; } } private  SharedToUser(final SharedToUser.SharedToUserBuilder builder); }
SharedToUser { public void merge(final SharedToUser other) { if (other != null) { sharedDate = other.sharedDate == null ? sharedDate : other.sharedDate; } } private  SharedToUser(final SharedToUser.SharedToUserBuilder builder); void merge(final SharedToUser other); }
SharedToUser { public void merge(final SharedToUser other) { if (other != null) { sharedDate = other.sharedDate == null ? sharedDate : other.sharedDate; } } private  SharedToUser(final SharedToUser.SharedToUserBuilder builder); void merge(final SharedToUser other); @EmbeddedId
    public SharedToUserPK id; }