private static UserServerSync deepCopy(UserServerSync source) { if (source == null) { return null; } UserServerSync copy = new UserServerSync(); if (source.getEndpointAttachResponses() != null) { copy.setEndpointAttachResponses(new ArrayList<>(source.getEndpointAttachResponses())); } if (source.getEndpointDetachResponses() != null) { copy.setEndpointDetachResponses(new ArrayList<>(source.getEndpointDetachResponses())); } if (source.getUserAttachNotification() != null) { copy.setUserAttachNotification(new UserAttachNotification( source.getUserAttachNotification().getUserExternalId(), source .getUserAttachNotification().getEndpointAccessToken())); } if (source.getUserAttachResponse() != null) { UserAttachResponse uarSource = source.getUserAttachResponse(); copy.setUserAttachResponse(new UserAttachResponse( uarSource.getResult(), uarSource.getErrorCode(), uarSource.getErrorReason())); } if (source.getUserDetachNotification() != null) { copy.setUserDetachNotification(new UserDetachNotification( source.getUserDetachNotification().getEndpointAccessToken())); } return copy; }
if (source.getUserAttachNotification() != null) { sync.setUserAttachNotification( new UserAttachNotification(source.getUserAttachNotification().getUserExternalId(), source .getUserAttachNotification().getEndpointAccessToken()));
return true; if (userResponse.getUserAttachNotification() != null) { return true;
if (userSync.getUserAttachNotification() != null) { UserAttachNotification nf = userSync.getUserAttachNotification(); buf.put(USER_ATTACH_NOTIFICATION_FIELD_ID); buf.put((byte) nf.getUserExternalId().length());