1 package org.hibernate.proxy; 3 4 import org.hibernate.HibernateException; 5 import org.hibernate.type.AbstractComponentType; 6 import org.hibernate.engine.SessionImplementor; 7 8 import java.util.Set ; 9 import java.lang.reflect.Method ; 10 import java.io.Serializable ; 11 12 17 public class Dom4jProxyFactory implements ProxyFactory { 18 19 private String entityName; 20 21 24 public void postInstantiate( 25 String entityName, 26 Class persistentClass, 27 Set interfaces, 28 Method getIdentifierMethod, 29 Method setIdentifierMethod, 30 AbstractComponentType componentIdType) throws HibernateException { 31 this.entityName = entityName; 32 } 33 34 37 public HibernateProxy getProxy(Serializable id, SessionImplementor session) throws HibernateException { 38 return new Dom4jProxy( new Dom4jLazyInitializer( entityName, id, session ) ); 39 } 40 } 41 | Popular Tags |