public void execute() { underlyingFacet.clearProperty(adapter); }}); }
public PropertyClearFacetWrapProxy( final PropertyClearFacet underlyingFacet, final ServerFacade serverFacade, final ObjectEncoderDecoder encoderDecoder, final String name) { super(underlyingFacet.getFacetHolder()); this.underlyingFacet = underlyingFacet; this.serverFacade = serverFacade; this.encoder = encoderDecoder; this.name = name; }
public void clearAssociation(final NakedObject ownerAdapter) { final PropertyClearFacet facet = getFacet(PropertyClearFacet.class); facet.clearProperty(ownerAdapter); }
public PropertyClearFacetWrapProxy( final PropertyClearFacet underlyingFacet, final ServerFacade serverFacade, final ObjectEncoderDecoder encoderDecoder, final String name) { super(underlyingFacet.getFacetHolder()); this.underlyingFacet = underlyingFacet; this.serverFacade = serverFacade; this.encoder = encoderDecoder; this.name = name; }
public void clearAssociation(final NakedObject ownerAdapter) { final PropertyClearFacet facet = getFacet(PropertyClearFacet.class); facet.clearProperty(ownerAdapter); }
public PropertyClearFacetWrapTransaction(final PropertyClearFacet underlyingFacet) { super(underlyingFacet.getFacetHolder()); this.underlyingFacet = underlyingFacet; }
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); } }