コード例 #1
0
 @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);
               }
             });
   }
 }
コード例 #2
0
 @Override
 public String toString() {
   return super.toString() + " --> " + underlyingFacet.toString();
 }
コード例 #3
0
 public CollectionAddToFacetWrapTransaction(final CollectionAddToFacet underlyingFacet) {
   super(underlyingFacet.getFacetHolder());
   this.underlyingFacet = underlyingFacet;
 }