org.tranql.ejb
Class MultiValuedCMRAccessor

java.lang.Object
  extended byorg.tranql.ejb.MultiValuedCMRAccessor
All Implemented Interfaces:
CMPFieldTransform, java.io.Serializable, javax.transaction.Synchronization

public final class MultiValuedCMRAccessor
extends java.lang.Object
implements CMPFieldTransform, javax.transaction.Synchronization

An accessor for multi-valued cmr-fields which behaves according to the EJB spec. Specifically, the accessor always returns the same instance for each invocation within a transaction and returns a different instance for different transactions. A snapshot of the collection content is made at the end of the transaction allowing read operations to be performed outside a transaction context.

Version:
$Revision: 156 $ $Date: 2004-12-05 11:00:27 +0100 (Sun, 05 Dec 2004) $
See Also:
Serialized Form

Constructor Summary
MultiValuedCMRAccessor(CMPFieldTransform next, javax.transaction.TransactionManager txManager, IdentityTransform idTransform, java.lang.Class proxyClass)
           
 
Method Summary
 void afterCompletion(int status)
           
 void beforeCompletion()
           
 java.lang.Object get(InTxCache cache, CacheRow row)
           
 void set(InTxCache cache, CacheRow row, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiValuedCMRAccessor

public MultiValuedCMRAccessor(CMPFieldTransform next,
                              javax.transaction.TransactionManager txManager,
                              IdentityTransform idTransform,
                              java.lang.Class proxyClass)
Method Detail

get

public java.lang.Object get(InTxCache cache,
                            CacheRow row)
Specified by:
get in interface CMPFieldTransform

set

public void set(InTxCache cache,
                CacheRow row,
                java.lang.Object value)
Specified by:
set in interface CMPFieldTransform

beforeCompletion

public void beforeCompletion()
Specified by:
beforeCompletion in interface javax.transaction.Synchronization

afterCompletion

public void afterCompletion(int status)
Specified by:
afterCompletion in interface javax.transaction.Synchronization


Copyright © -2006 The Codehaus. All Rights Reserved.