Package com.impetus.kundera.proxy

Examples of com.impetus.kundera.proxy.LazyInitializer.initialize()


        LazyInitializer li = proxy.getKunderaLazyInitializer();
        Assert.assertEquals(CglibLazyInitializer.class, li.getClass());
       
        try
        {
            li.initialize();
        }catch(LazyInitializationException liex)
        {
//            Assert.assertEquals("could not initialize proxy " + PersonnelDTO.class.getName() + "_"
//                        + "1" + " - no EntityManager", liex.getMessage());
        }
View Full Code Here


        KunderaProxy proxy = factory.getProxy("personnel#1", PersonnelDTO.class, null, null, "1", delegator);
        LazyInitializer li = proxy.getKunderaLazyInitializer();
        ((CglibLazyInitializer)li).setPersistenceDelegator(delegator);
        li.setImplementation(proxy);
       
        li.initialize();
        Assert.assertNotNull(((CglibLazyInitializer)li).getTarget());
        Assert.assertNotNull(((CglibLazyInitializer)li).getEntityName());
        Assert.assertEquals("personnel#1",((CglibLazyInitializer)li).getEntityName());
        Assert.assertNotNull(li.getPersistenceDelegator());
        Assert.assertSame(delegator,li.getPersistenceDelegator());
View Full Code Here

        KunderaProxy proxy = factory.getProxy("personnel", PersonnelDTO.class, null, null, "1", delegator);
        LazyInitializer li = proxy.getKunderaLazyInitializer();
       
        try
        {
            li.initialize();
            Assert.fail("Should have gone to catch block!");
        } catch(LazyInitializationException liex)
        {
            Assert.assertEquals("could not initialize proxy " + PersonnelDTO.class.getName() + "_"
                    + "1" + " - the owning Session was closed",liex.getMessage());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.