@Override public void add( final ObjectAdapter adapter, final ObjectAdapter referencedAdapter, final InteractionInitiatedBy interactionInitiatedBy) { if (adapter.isTransient()) { // NOT !adapter.isPersistent(); // (value adapters are neither persistent or transient) underlyingFacet.add(adapter, referencedAdapter, interactionInitiatedBy); } else { getTransactionManager() .executeWithinTransaction( new TransactionalClosure() { @Override public void execute() { underlyingFacet.add(adapter, referencedAdapter, interactionInitiatedBy); } }); } }
@Override public String toString() { return super.toString() + " --> " + underlyingFacet.toString(); }
public CollectionAddToFacetWrapTransaction(final CollectionAddToFacet underlyingFacet) { super(underlyingFacet.getFacetHolder()); this.underlyingFacet = underlyingFacet; }