类 JavassistProxyFactory
- java.lang.Object
-
- org.hibernate.proxy.pojo.javassist.JavassistProxyFactory
-
- 所有已实现的接口:
Serializable,ProxyFactory
public class JavassistProxyFactory extends Object implements ProxyFactory, Serializable
AProxyFactoryimplementation for producing Javassist-based proxies.- 作者:
- Muga Nishizawa
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 JavassistProxyFactory()
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static javassist.util.proxy.ProxyFactorybuildJavassistProxyFactory(Class persistentClass, Class[] interfaces)static HibernateProxydeserializeProxy(SerializableProxy serializableProxy)HibernateProxygetProxy(Serializable id, SharedSessionContractImplementor session)Create a new proxy instancevoidpostInstantiate(String entityName, Class persistentClass, Set<Class> interfaces, Method getIdentifierMethod, Method setIdentifierMethod, CompositeType componentIdType)Called immediately after instantiation of this factory.
-
-
-
方法详细资料
-
postInstantiate
public void postInstantiate(String entityName, Class persistentClass, Set<Class> interfaces, Method getIdentifierMethod, Method setIdentifierMethod, CompositeType componentIdType) throws HibernateException
从接口复制的说明:ProxyFactoryCalled immediately after instantiation of this factory. Essentially equivalent to constructor injection, but contracted here via interface.- 指定者:
postInstantiate在接口中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;HibernateProxyis 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 thetypeof the identifier property; again accessing the id should generally not cause initialization - but need to bear in mindmappings. - 抛出:
HibernateException- Indicates a problem completing post instantiation initialization.
-
buildJavassistProxyFactory
public static javassist.util.proxy.ProxyFactory buildJavassistProxyFactory(Class persistentClass, Class[] interfaces)
-
getProxy
public HibernateProxy getProxy(Serializable id, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:ProxyFactoryCreate a new proxy instance- 指定者:
getProxy在接口中ProxyFactory- 参数:
id- The id value for the proxy to be generated.session- The session to which the generated proxy will be associated.- 返回:
- The generated proxy.
- 抛出:
HibernateException- Indicates problems generating the requested proxy.
-
deserializeProxy
public static HibernateProxy deserializeProxy(SerializableProxy serializableProxy)
-
-