public class JavassistProxyFactory extends Object implements ProxyFactory, Serializable
ProxyFactory
implementation for producing Javassist-based proxies.Constructor and Description |
---|
JavassistProxyFactory() |
Modifier and Type | Method and Description |
---|---|
static javassist.util.proxy.ProxyFactory |
buildJavassistProxyFactory(Class persistentClass,
Class[] interfaces) |
static HibernateProxy |
deserializeProxy(SerializableProxy serializableProxy) |
HibernateProxy |
getProxy(Serializable id,
SessionImplementor session)
Create a new proxy instance
|
void |
postInstantiate(String entityName,
Class persistentClass,
Set<Class> interfaces,
Method getIdentifierMethod,
Method setIdentifierMethod,
CompositeType componentIdType)
Called immediately after instantiation of this factory.
|
public void postInstantiate(String entityName, Class persistentClass, Set<Class> interfaces, Method getIdentifierMethod, Method setIdentifierMethod, CompositeType componentIdType) throws HibernateException
ProxyFactory
postInstantiate
in interface ProxyFactory
entityName
- The name of the entity for which this factory should
generate proxies.persistentClass
- The entity class for which to generate proxies;
not always the same as the entityName.interfaces
- The interfaces to expose in the generated proxy;
HibernateProxy
is already included in this collection.getIdentifierMethod
- Reference to the identifier getter method;
invocation on this method should not force initializationsetIdentifierMethod
- Reference to the identifier setter method;
invocation on this method should not force initializationcomponentIdType
- For composite identifier types, a reference to
the type
of the identifier
property; again accessing the id should generally not cause
initialization - but need to bear in mind HibernateException
- Indicates a problem completing post
instantiation initialization.public static javassist.util.proxy.ProxyFactory buildJavassistProxyFactory(Class persistentClass, Class[] interfaces)
public HibernateProxy getProxy(Serializable id, SessionImplementor session) throws HibernateException
ProxyFactory
getProxy
in interface ProxyFactory
id
- The id value for the proxy to be generated.session
- The session to which the generated proxy will be
associated.HibernateException
- Indicates problems generating the requested
proxy.public static HibernateProxy deserializeProxy(SerializableProxy serializableProxy)
Copyright © 2017 JBoss by Red Hat. All rights reserved.