Top Description Fields Constructors Methods
org.hibernate.proxy.pojo.javassist

public Class JavassistLazyInitializer

extends BasicLazyInitializer
implements MethodHandler
Class Inheritance
All Implemented Interfaces
javassist.util.proxy.MethodHandler
Imports
java.io.Serializable, java.lang.reflect.InvocationTargetException, .Method, javassist.util.proxy.MethodFilter, .MethodHandler, .ProxyFactory, .ProxyObject, org.slf4j.LoggerFactory, org.hibernate.HibernateException, org.hibernate.engine.SessionImplementor, org.hibernate.proxy.pojo.BasicLazyInitializer, org.hibernate.proxy.HibernateProxy, org.hibernate.type.CompositeType, org.hibernate.util.ReflectHelper

A Javassist-based lazy initializer proxy.
Author
Muga Nishizawa

Field Summary

Modifier and TypeField and Description
private boolean
private static final MethodFilter
private Class<T>[]
Inherited from org.hibernate.proxy.pojo.BasicLazyInitializer:
componentIdTypegetIdentifierMethodINVOKE_IMPLEMENTATIONoverridesEqualspersistentClasssetIdentifierMethod

Constructor Summary

AccessConstructor and Description
private
JavassistLazyInitializer(final String entityName, final Class<T> persistentClass, final Class<T>[] interfaces, final Serializable id, final Method getIdentifierMethod, final Method setIdentifierMethod, final CompositeType componentIdType, final SessionImplementor session)

Method Summary

Modifier and TypeMethod and Description
public static HibernateProxy
getProxy(final String entityName, final Class<T> persistentClass, final Class<T>[] interfaces, final Method getIdentifierMethod, final Method setIdentifierMethod, CompositeType componentIdType, final Serializable id, final SessionImplementor session)

public static HibernateProxy
getProxy(final Class<T> factory, final String entityName, final Class<T> persistentClass, final Class<T>[] interfaces, final Method getIdentifierMethod, final Method setIdentifierMethod, final CompositeType componentIdType, final Serializable id, final SessionImplementor session)

public static Class<T>
getProxyFactory(Class<T> persistentClass, Class<T>[] interfaces)

public Object
invoke(final Object
the proxy instance.
proxy
,
final Method
the overridden method declared in the super class or interface.
thisMethod
,
final Method
the forwarder method for invoking the overridden method. It is null if the overridden mehtod is abstract or declared in the interface.
proceed
,
final Object[]
an array of objects containing the values of the arguments passed in the method invocation on the proxy instance. If a parameter type is a primitive type, the type of the array element is a wrapper class.
args
)

Implements javassist.util.proxy.MethodHandler.invoke.

Is called when a method is invoked on a proxy instance associated with this handler.
protected Object
Inherited from org.hibernate.proxy.pojo.BasicLazyInitializer:
getPersistentClassinvoke

Field Detail

constructedback to summary
private boolean constructed
FINALIZE_FILTERback to summary
private static final MethodFilter FINALIZE_FILTER
interfacesback to summary
private Class<T>[] interfaces

Constructor Detail

JavassistLazyInitializerback to summary
private JavassistLazyInitializer(final String entityName, final Class<T> persistentClass, final Class<T>[] interfaces, final Serializable id, final Method getIdentifierMethod, final Method setIdentifierMethod, final CompositeType componentIdType, final SessionImplementor session)

Method Detail

getProxyback to summary
public static HibernateProxy getProxy(final String entityName, final Class<T> persistentClass, final Class<T>[] interfaces, final Method getIdentifierMethod, final Method setIdentifierMethod, CompositeType componentIdType, final Serializable id, final SessionImplementor session) throws HibernateException
getProxyback to summary
public static HibernateProxy getProxy(final Class<T> factory, final String entityName, final Class<T> persistentClass, final Class<T>[] interfaces, final Method getIdentifierMethod, final Method setIdentifierMethod, final CompositeType componentIdType, final Serializable id, final SessionImplementor session) throws HibernateException
getProxyFactoryback to summary
public static Class<T> getProxyFactory(Class<T> persistentClass, Class<T>[] interfaces) throws HibernateException
invokeback to summary
public Object invoke(final Object proxy, final Method thisMethod, final Method proceed, final Object[] args) throws Throwable

Implements javassist.util.proxy.MethodHandler.invoke.

Doc from javassist.util.proxy.MethodHandler.invoke.

Is called when a method is invoked on a proxy instance associated with this handler. This method must process that method invocation.

Parameters
proxy:Object

the proxy instance.

thisMethod:Method

the overridden method declared in the super class or interface.

proceed:Method

the forwarder method for invoking the overridden method. It is null if the overridden mehtod is abstract or declared in the interface.

args:Object[]

an array of objects containing the values of the arguments passed in the method invocation on the proxy instance. If a parameter type is a primitive type, the type of the array element is a wrapper class.

Returns:Object

the resulting value of the method invocation.

Exceptions
Throwable:
if the method invocation fails.
serializableProxyback to summary
protected Object serializableProxy()

Implements abstract org.hibernate.proxy.pojo.BasicLazyInitializer.serializableProxy.