org.perfectjpattern.jee.integration.dao
Class JpaQueryAdapter
java.lang.Object
org.perfectjpattern.core.structural.AbstractSurrogate<T,A>
org.perfectjpattern.core.structural.adapter.Adapter<IQuery,javax.persistence.Query>
org.perfectjpattern.jee.integration.dao.JpaQueryAdapter
- All Implemented Interfaces:
- InvocationHandler, IAdapter<IQuery,javax.persistence.Query>, ISurrogate<IQuery>
public class JpaQueryAdapter
- extends Adapter<IQuery,javax.persistence.Query>
Adapts Hibernate's Query
to the JPA implementation-free
PerfectJPattern's IQuery
definition
- Version:
- $Revision: 1.0 $Date: Feb 18, 2009 11:54:49 AM $
- Author:
- Giovanni Azua
-
-
JpaQueryAdapter
public JpaQueryAdapter(javax.persistence.Query anAdaptee)
throws IllegalArgumentException
- Constructs a
JpaQueryAdapter
from the Adaptee
Query
instance
- Parameters:
anAdaptee
- Adaptee Hibernate Query
- 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<IQuery,javax.persistence.Query>
- 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.