public void execute() { underlyingFacet.clearProperty(adapter); }}); }
public void clearAssociation(final NakedObject ownerAdapter) { final PropertyClearFacet facet = getFacet(PropertyClearFacet.class); facet.clearProperty(ownerAdapter); }
public void clearAssociation(final NakedObject ownerAdapter) { final PropertyClearFacet facet = getFacet(PropertyClearFacet.class); facet.clearProperty(ownerAdapter); }
public void clearProperty(final NakedObject adapter) { if (adapter.isTransient()) { // NOT !adapter.isPersistent(); // (value adapters are neither persistent or transient) underlyingFacet.clearProperty(adapter); } else { getTransactionManager().executeWithinTransaction( new TransactionalClosureAbstract(){ public void execute() { underlyingFacet.clearProperty(adapter); }}); } }
public void clearProperty(final NakedObject inObject) { if (inObject.isPersistent()) { final IdentityData targetReference = encoder.encodeIdentityData(inObject); ObjectData[] updates; try { IdentityData nullData = encoder.encodeIdentityData(null); // not used. ClearAssociationRequest request = new ClearAssociationRequest(getAuthenticationSession(), name, targetReference, nullData); ClearAssociationResponse response = serverFacade.clearAssociation(request); updates = response.getUpdates(); } catch (final ConcurrencyException e) { throw ProxyUtil.concurrencyException(e); } encoder.decode(updates); } else { underlyingFacet.clearProperty(inObject); } }
public void clearProperty(final NakedObject inObject) { if (inObject.isPersistent()) { final IdentityData targetReference = encoder.encodeIdentityData(inObject); ObjectData[] updates; try { IdentityData nullData = encoder.encodeIdentityData(null); // not used. ClearAssociationRequest request = new ClearAssociationRequest(getAuthenticationSession(), name, targetReference, nullData); ClearAssociationResponse response = serverFacade.clearAssociation(request); updates = response.getUpdates(); } catch (final ConcurrencyException e) { throw ProxyUtil.concurrencyException(e); } encoder.decode(updates); } else { underlyingFacet.clearProperty(inObject); } }