Examples of UnenhancedPropertyAccess


Examples of org.apache.openjpa.enhance.UnenhancedPropertyAccess

        em.close();
    }

    public void testPNonTransToPDirty() {
        em.setOptimistic(false);
        UnenhancedPropertyAccess o = (UnenhancedPropertyAccess)
            em.createQuery("select o from UnenhancedPropertyAccess o")
                .getSingleResult();
        em.getTransaction().begin();
        try {
            Broker b = JPAFacadeHelper.toBroker(em);
            OpenJPAStateManager sm = b.getStateManager(o);
            assertEquals(PCState.PNONTRANS, sm.getPCState());
            o.setLazyField("foo");
            assertEquals(PCState.PDIRTY, sm.getPCState());
        } finally {
                em.getTransaction().rollback();
        }
    }
View Full Code Here

Examples of org.apache.openjpa.enhance.UnenhancedPropertyAccess

    protected UnenhancedPropertyAccessSubclass newManagedInstance() {
        UnenhancedPropertyAccessSubclass e =
            new UnenhancedPropertyAccessSubclass();
        e.setStringField("foo");
        UnenhancedPropertyAccess related = new UnenhancedPropertyAccess();
        related.setStringField("bar");
        e.setRelated(related);
        return e;
    }
View Full Code Here

Examples of org.apache.openjpa.enhance.UnenhancedPropertyAccess

    protected Class<UnenhancedPropertyAccess> getManagedType() {
        return UnenhancedPropertyAccess.class;
    }

    protected UnenhancedPropertyAccess newManagedInstance() {
        UnenhancedPropertyAccess e = new UnenhancedPropertyAccess();
        e.setStringField("foo");
        return e;
    }
View Full Code Here

Examples of org.apache.openjpa.enhance.UnenhancedPropertyAccess

    extends SingleEMTestCase {

    public void setUp() {
        setUp(UnenhancedPropertyAccess.class, CLEAR_TABLES);

        UnenhancedPropertyAccess o = new UnenhancedPropertyAccess();
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        em.persist(o);
        em.getTransaction().commit();
        em.close();
View Full Code Here

Examples of org.apache.openjpa.enhance.UnenhancedPropertyAccess

    protected Class<UnenhancedPropertyAccess> getManagedType() {
        return UnenhancedPropertyAccess.class;
    }

    protected UnenhancedPropertyAccess newManagedInstance() {
        UnenhancedPropertyAccess e = new UnenhancedPropertyAccess();
        e.setStringField("foo");
        return e;
    }
View Full Code Here

Examples of org.apache.openjpa.enhance.UnenhancedPropertyAccess

    protected UnenhancedPropertyAccessSubclass newManagedInstance() {
        UnenhancedPropertyAccessSubclass e =
            new UnenhancedPropertyAccessSubclass();
        e.setStringField("foo");
        UnenhancedPropertyAccess related = new UnenhancedPropertyAccess();
        related.setStringField("bar");
        e.setRelated(related);
        return e;
    }
View Full Code Here

Examples of org.apache.openjpa.enhance.UnenhancedPropertyAccess

    extends SingleEMTestCase {

    public void setUp() {
        setUp(UnenhancedPropertyAccess.class, CLEAR_TABLES, "openjpa.RuntimeUnenhancedClasses", "supported");

        UnenhancedPropertyAccess o = new UnenhancedPropertyAccess();
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        em.persist(o);
        em.getTransaction().commit();
        em.close();
View Full Code Here

Examples of org.apache.openjpa.enhance.UnenhancedPropertyAccess

        em.close();
    }

    public void testPNonTransToPDirty() {
        em.setOptimistic(false);
        UnenhancedPropertyAccess o = (UnenhancedPropertyAccess)
            em.createQuery("select o from UnenhancedPropertyAccess o")
                .getSingleResult();
        em.getTransaction().begin();
        try {
            Broker b = JPAFacadeHelper.toBroker(em);
            OpenJPAStateManager sm = b.getStateManager(o);
            assertEquals(PCState.PNONTRANS, sm.getPCState());
            o.setLazyField("foo");
            assertEquals(PCState.PDIRTY, sm.getPCState());
        } finally {
                em.getTransaction().rollback();
        }
    }
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.