org.perfectjpattern.jee.integration.dao
Class HibernateTransactionAdapter

java.lang.Object
  extended by org.perfectjpattern.core.structural.AbstractSurrogate<T,A>
      extended by org.perfectjpattern.core.structural.adapter.Adapter<ITransaction,org.hibernate.Transaction>
          extended by org.perfectjpattern.jee.integration.dao.HibernateTransactionAdapter
All Implemented Interfaces:
InvocationHandler, IAdapter<ITransaction,org.hibernate.Transaction>, ISurrogate<ITransaction>

public final class HibernateTransactionAdapter
extends Adapter<ITransaction,org.hibernate.Transaction>

Adapts Hibernate's Transaction to the JPA implementation-free PerfectJPattern's ITransaction definition

Version:
$Revision: 1.0 $Date: Feb 10, 2009 8:26:06 PM $
Author:
Giovanni Azua
 

Constructor Summary
HibernateTransactionAdapter(org.hibernate.Transaction anAdaptee)
          Constructs a HibernateTransactionAdapter from the Adaptee Transaction instance
 
Method Summary
protected  Object invokeUnderlying(Method aMethod, Object[] anArguments)
          Returns the result of the Method invocation.
 
Methods inherited from class org.perfectjpattern.core.structural.adapter.Adapter
getAdaptee, getTarget, setAdaptingStrategy
 
Methods inherited from class org.perfectjpattern.core.structural.AbstractSurrogate
equals, getComponent, getComponentClass, getUnderlying, hashCode, invoke
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.perfectjpattern.core.api.structural.ISurrogate
getComponent
 
Methods inherited from interface java.lang.reflect.InvocationHandler
invoke
 

Constructor Detail

HibernateTransactionAdapter

public HibernateTransactionAdapter(org.hibernate.Transaction anAdaptee)
                            throws IllegalArgumentException
Constructs a HibernateTransactionAdapter from the Adaptee Transaction instance

Parameters:
anAdaptee -
Throws:
IllegalArgumentException
Method Detail

invokeUnderlying

protected Object invokeUnderlying(Method aMethod,
                                  Object[] anArguments)
                           throws Throwable
Returns the result of the Method invocation. This method has two main purposes:

Overrides:
invokeUnderlying in class Adapter<ITransaction,org.hibernate.Transaction>
Parameters:
aMethod - Method to invoke
anArguments - Array of input arguments for the Method to invoke
Returns:
result of the Method invocation
Throws:
Throwable


Copyright © 2007-2009. All Rights Reserved.