当前页面: 
在线文档首页 > 
Hibernate 3.2.3 正式版 API 英文文档
JavassistProxyFactory (Hibernate API Documentation) - Hibernate 3.2.3 正式版 API 英文文档
org.hibernate.proxy.pojo.javassist
Class JavassistProxyFactory
java.lang.Object
   org.hibernate.proxy.pojo.javassist.JavassistProxyFactory
org.hibernate.proxy.pojo.javassist.JavassistProxyFactory
- All Implemented Interfaces: 
- ProxyFactory, Serializable
- public class JavassistProxyFactory- extends Object- implements ProxyFactory, Serializable
A ProxyFactory implementation for producing Javassist-based proxies.
- Author:
- Muga Nishizawa
- See Also:
- Serialized Form
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
NO_CLASSES
protected static final Class[] NO_CLASSES
JavassistProxyFactory
public JavassistProxyFactory()
postInstantiate
public void postInstantiate(String entityName,
                            Class persistentClass,
                            Set interfaces,
                            Method getIdentifierMethod,
                            Method setIdentifierMethod,
                            AbstractComponentType componentIdType)
                     throws HibernateException
- Description copied from interface: ProxyFactory
- Called immediately after instantiation of this factory.
 
 Essentially equivalent to contructor injection, but contracted
 here via interface.
 
- 
- Specified by:
- postInstantiatein interface- ProxyFactory
 
- 
- Parameters:
- 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 initialization
- setIdentifierMethod- Reference to the identifier setter method;
 invocation on this method should not force initialization
- componentIdType- For composite identifier types, a reference to
 the- typeof the identifier
 property; again accessing the id should generally not cause
 initialization - but need to bear in mind 
 mappings.
- Throws:
- HibernateException- Indicates a problem completing post
 instantiation initialization.
 
getProxy
public HibernateProxy getProxy(Serializable id,
                               SessionImplementor session)
                        throws HibernateException
- Description copied from interface: ProxyFactory
- Create a new proxy instance
 
- 
- Specified by:
- getProxyin interface- ProxyFactory
 
- 
- Parameters:
- id- The id value for the proxy to be generated.
- session- The session to which the generated proxy will be
 associated.
- Returns:
- The generated proxy.
- Throws:
- HibernateException- Indicates problems generating the requested
 proxy.