Package org.apache.openjpa.persistence.proxy.delayed

Examples of org.apache.openjpa.persistence.proxy.delayed.IDepartment


    @Override
    public void testPostDetach() {
        EntityManager em = emf.createEntityManager();
       
        // Create a new department and an employee
        IDepartment d = createDepartment();
        IEmployee e = createEmployee();
        e.setDept(d);
        e.setEmpName("John");
        Collection<IEmployee> emps = createEmployees();
        emps.add(e);
        d.setEmployees(emps);
       
        em.getTransaction().begin();
        em.persist(d);
        em.getTransaction().commit();
        resetSQL();
        em.clear();
       
        d = findDepartment(em, d.getId());
        emps = d.getEmployees();
        em.close();
       
        // assert there was no select on the employee table
        assertNoneSQLAnyOrder("SELECT .* DC_EMPLOYEE .*");
        assertTrue(emps instanceof DelayedTreeSetProxy);
View Full Code Here


    @Override
    public void testPostDetach() {
        EntityManager em = emf.createEntityManager();
       
        // Create a new department and an employee
        IDepartment d = createDepartment();
        IEmployee e = createEmployee();
        e.setDept(d);
        e.setEmpName("John");
        Collection<IEmployee> emps = createEmployees();
        emps.add(e);
        d.setEmployees(emps);
       
        em.getTransaction().begin();
        em.persist(d);
        em.getTransaction().commit();
        resetSQL();
        em.clear();
       
        d = findDepartment(em, d.getId());
        emps = d.getEmployees();
        em.close();
       
        // assert there was no select on the employee table
        assertNoneSQLAnyOrder("SELECT .* DC_EMPLOYEE .*");
        assertTrue(emps instanceof DelayedPriorityQueueProxy);
View Full Code Here

    @Override
    public void testPostDetach() {
        EntityManager em = emf.createEntityManager();
       
        // Create a new department and an employee
        IDepartment d = createDepartment();
        IEmployee e = createEmployee();
        e.setDept(d);
        e.setEmpName("John");
        Collection<IEmployee> emps = createEmployees();
        emps.add(e);
        d.setEmployees(emps);
       
        em.getTransaction().begin();
        em.persist(d);
        em.getTransaction().commit();
        resetSQL();
        em.clear();
       
        d = findDepartment(em, d.getId());
        emps = d.getEmployees();
        em.close();
       
        // assert there was no select on the employee table
        assertNoneSQLAnyOrder("SELECT .* DC_EMPLOYEE .*");
        assertTrue(emps instanceof DelayedHashSetProxy);
View Full Code Here

    @Override
    public void testPostDetach() {
        EntityManager em = emf.createEntityManager();
       
        // Create a new department and an employee
        IDepartment d = createDepartment();
        IEmployee e = createEmployee();
        e.setDept(d);
        e.setEmpName("John");
        Collection<IEmployee> emps = createEmployees();
        emps.add(e);
        d.setEmployees(emps);
       
        em.getTransaction().begin();
        em.persist(d);
        em.getTransaction().commit();
        resetSQL();
        em.clear();
       
        d = findDepartment(em, d.getId());
        emps = d.getEmployees();
        em.close();
       
        // assert there was no select on the employee table
        assertNoneSQLAnyOrder("SELECT .* DC_EMPLOYEE .*");
        assertTrue(emps instanceof DelayedLinkedHashSetProxy);
View Full Code Here

    @Override
    public void testPostDetach() {
        EntityManager em = emf.createEntityManager();
       
        // Create a new department and an employee
        IDepartment d = createDepartment();
        IEmployee e = createEmployee();
        e.setDept(d);
        e.setEmpName("John");
        Collection<IEmployee> emps = createEmployees();
        emps.add(e);
        d.setEmployees(emps);
       
        em.getTransaction().begin();
        em.persist(d);
        em.getTransaction().commit();
        resetSQL();
        em.clear();
       
        d = findDepartment(em, d.getId());
        emps = d.getEmployees();
        em.close();
       
        // assert there was no select on the employee table
        assertNoneSQLAnyOrder("SELECT .* DC_EMPLOYEE .*");
        assertTrue(emps instanceof DelayedLinkedListProxy);
View Full Code Here

    @Override
    public void testPostDetach() {
        EntityManager em = emf.createEntityManager();
       
        // Create a new department and an employee
        IDepartment d = createDepartment();
        IEmployee e = createEmployee();
        e.setDept(d);
        e.setEmpName("John");
        Collection<IEmployee> emps = createEmployees();
        emps.add(e);
        d.setEmployees(emps);
       
        em.getTransaction().begin();
        em.persist(d);
        em.getTransaction().commit();
        resetSQL();
        em.clear();
       
        d = findDepartment(em, d.getId());
        emps = d.getEmployees();
        em.close();
       
        // assert there was no select on the employee table
        assertNoneSQLAnyOrder("SELECT .* DC_EMPLOYEE .*");
        assertTrue(emps instanceof DelayedVectorProxy);
View Full Code Here

    @Override
    public void testPostDetach() {
        EntityManager em = emf.createEntityManager();
       
        // Create a new department and an employee
        IDepartment d = createDepartment();
        IEmployee e = createEmployee();
        e.setDept(d);
        e.setEmpName("John");
        Collection<IEmployee> emps = createEmployees();
        emps.add(e);
        d.setEmployees(emps);
       
        em.getTransaction().begin();
        em.persist(d);
        em.getTransaction().commit();
        resetSQL();
        em.clear();
       
        d = findDepartment(em, d.getId());
        emps = d.getEmployees();
        em.close();
       
        // assert there was no select on the employee table
        assertNoneSQLAnyOrder("SELECT .* DC_EMPLOYEE .*");
        assertTrue(emps instanceof DelayedArrayListProxy);
View Full Code Here

    @Override
    public void testPostDetach() {
        EntityManager em = emf.createEntityManager();
       
        // Create a new department and an employee
        IDepartment d = createDepartment();
        IEmployee e = createEmployee();
        e.setDept(d);
        e.setEmpName("John");
        Collection<IEmployee> emps = createEmployees();
        emps.add(e);
        d.setEmployees(emps);
       
        em.getTransaction().begin();
        em.persist(d);
        em.getTransaction().commit();
        resetSQL();
        em.clear();
       
        d = findDepartment(em, d.getId());
        emps = d.getEmployees();
        em.close();
       
        // assert there was no select on the employee table
        assertNoneSQLAnyOrder("SELECT .* DC_EMPLOYEE .*");
        assertTrue(emps instanceof DelayedArrayListProxy);
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.proxy.delayed.IDepartment

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.