org.perfectjpattern.jee.integration.dao
Class EntityTransactionAdapter
java.lang.Object
org.perfectjpattern.core.structural.AbstractSurrogate<T,A>
org.perfectjpattern.core.structural.adapter.Adapter<ITransaction,javax.persistence.EntityTransaction>
org.perfectjpattern.jee.integration.dao.EntityTransactionAdapter
- All Implemented Interfaces:
- InvocationHandler, IAdapter<ITransaction,javax.persistence.EntityTransaction>, ISurrogate<ITransaction>
public final class EntityTransactionAdapter
- extends Adapter<ITransaction,javax.persistence.EntityTransaction>
Adapts JPA's EntityTransaction
to the JPA implementation-free
PerfectJPattern's ITransaction
- Version:
- $Revision: 1.0 $Date: Feb 10, 2009 8:26:06 PM $
- Author:
- Giovanni Azua
-
-
EntityTransactionAdapter
public EntityTransactionAdapter(javax.persistence.EntityTransaction anAdaptee)
throws IllegalArgumentException
- Constructs a
EntityTransactionAdapter
from the Adaptee
EntityTransaction
instance
- Parameters:
anAdaptee
-
- Throws:
IllegalArgumentException
invokeUnderlying
protected Object invokeUnderlying(Method aMethod,
Object[] anArguments)
throws Throwable
- Returns the result of the Method invocation. This method has two
main purposes:
- Provides facility to invoke a method on the actual Underlying
- Concrete surrogate implementations that override this method have
a single point to control access to the actual Underlying method
invokation.
- Overrides:
invokeUnderlying
in class Adapter<ITransaction,javax.persistence.EntityTransaction>
- Parameters:
aMethod
- Method to invokeanArguments
- Array of input arguments for the Method to invoke
- Returns:
- result of the Method invocation
- Throws:
Throwable
Copyright © 2007-2009. All Rights Reserved.