Package org.hibernate.proxy

Examples of org.hibernate.proxy.CGLIBProxyFactory


    }
  }

  public static DataPoint createProxy() throws NoSuchMethodException {
    MockHibernateSession.isOpened=true;
    ProxyFactory pf = new CGLIBProxyFactory();
    HashSet proxyInterfaces = new HashSet();
    proxyInterfaces.add(HibernateProxy.class);
    Class mappedClass = DataPoint.class;
    Method proxyGetIdentifierMethod = mappedClass.getMethod("getId",new Class[]{});
    Method proxySetIdentifierMethod = mappedClass.getMethod("setId",new Class[]{Long.TYPE});
    pf.postInstantiate(
        "Test" ,
        mappedClass,
        proxyInterfaces,
        proxyGetIdentifierMethod,
        proxySetIdentifierMethod,
        null
    );
   
    DataPoint proxyPoint = (DataPoint)pf.getProxy(new Long(0),new MockHibernateSession());
    MockHibernateSession.isOpened=false;
    return proxyPoint;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.proxy.CGLIBProxyFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.