org.jboss.seam.persistence
Class HibernateSessionInvocationHandler

java.lang.Object
  extended by org.jboss.seam.persistence.HibernateSessionInvocationHandler
All Implemented Interfaces:
Serializable, InvocationHandler

public class HibernateSessionInvocationHandler
extends Object
implements InvocationHandler, Serializable

InvocationHandler that proxies the Session, and implements EL interpolation in HQL. Needs to implement SessionImplementor because DetachedCriteria casts the Session to SessionImplementor.

Author:
Gavin King, Emmanuel Bernard, Mike Youngstrom
See Also:
Serialized Form

Constructor Summary
HibernateSessionInvocationHandler(org.hibernate.Session delegate)
           
 
Method Summary
protected  Object handleCreateQueryWithString(Method method, Object[] args)
           
protected  Object handleReconnectNoArg(Method method)
           
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateSessionInvocationHandler

public HibernateSessionInvocationHandler(org.hibernate.Session delegate)
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

handleCreateQueryWithString

protected Object handleCreateQueryWithString(Method method,
                                             Object[] args)
                                      throws Throwable
Throws:
Throwable

handleReconnectNoArg

protected Object handleReconnectNoArg(Method method)
                               throws Throwable
Throws:
Throwable