public void add(final ObjectAdapter inObject, final ObjectAdapter referencedAdapter) {
if (inObject.isPersistent()) {
try {
final IdentityData targetReference = encoderDecoder.encodeIdentityData(inObject);
final IdentityData associateReference = encoderDecoder.encodeIdentityData(referencedAdapter);
final SetAssociationRequest request =
new SetAssociationRequest(getAuthenticationSession(), name, targetReference, associateReference);
final SetAssociationResponse response = serverFacade.setAssociation(request);
final ObjectData[] updates = response.getUpdates();
encoderDecoder.decode(updates);
} catch (final ConcurrencyException e) {
throw ProxyUtil.concurrencyException(e);