Package com.impetus.kundera.proxy

Examples of com.impetus.kundera.proxy.LazyInitializerFactory


    private void onClearProxy()
    {
        if (kunderaMetadata.getCoreMetadata() != null)
        {
            LazyInitializerFactory lazyInitializerrFactory = kunderaMetadata.getCoreMetadata()
                    .getLazyInitializerFactory();

            if (lazyInitializerrFactory != null)
            {
                lazyInitializerrFactory.clearProxies();
            }
        }
    }
View Full Code Here


    private void onSetProxyOwners(final EntityMetadata m, Object e)
    {
        if (kunderaMetadata.getCoreMetadata() != null)
        {
            LazyInitializerFactory lazyInitializerrFactory = kunderaMetadata.getCoreMetadata()
                    .getLazyInitializerFactory();

            if (lazyInitializerrFactory != null)
            {
                lazyInitializerrFactory.setProxyOwners(m, e);
            }
        }
    }
View Full Code Here

     */
    @Test
    public void testGetProxy()
    {

        LazyInitializerFactory factory = kunderaMetadata.getCoreMetadata().getLazyInitializerFactory();
        KunderaProxy proxy = factory.getProxy("personnel", PersonnelDTO.class, null, null, "1", null);
        LazyInitializer li = proxy.getKunderaLazyInitializer();
        Assert.assertEquals(CglibLazyInitializer.class, li.getClass());
        Assert.assertTrue(li.isUninitialized());
        Assert.assertFalse(li.isUnwrap());
        Assert.assertEquals("personnel", li.getEntityName());
View Full Code Here

     */
    @Test
    public void testWithNullPD()
    {

        LazyInitializerFactory factory = kunderaMetadata.getCoreMetadata().getLazyInitializerFactory();
        KunderaProxy proxy = factory.getProxy("personnel", PersonnelDTO.class, null, null, "1", null);
        LazyInitializer li = proxy.getKunderaLazyInitializer();
        Assert.assertEquals(CglibLazyInitializer.class, li.getClass());
       
        try
        {
View Full Code Here

    public void testWithPDInstance() throws NoSuchMethodException, Throwable
    {
        PersistenceDelegator delegator = CoreTestUtilities.getDelegator(em);
        PersonnelDTO dto = new PersonnelDTO("1", "vivek", "mishra");
        em.persist(dto);
        LazyInitializerFactory factory = kunderaMetadata.getCoreMetadata().getLazyInitializerFactory();
        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();
View Full Code Here

        PersistenceDelegator delegator = CoreTestUtilities.getDelegator(em);
        PersonnelDTO dto = new PersonnelDTO("1", "vivek", "mishra");
        em.persist(dto);
        em.close();

        LazyInitializerFactory factory = kunderaMetadata.getCoreMetadata().getLazyInitializerFactory();
        KunderaProxy proxy = factory.getProxy("personnel", PersonnelDTO.class, null, null, "1", delegator);
        LazyInitializer li = proxy.getKunderaLazyInitializer();
       
        try
        {
            li.initialize();
View Full Code Here

TOP

Related Classes of com.impetus.kundera.proxy.LazyInitializerFactory

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.