Package org.apache.cayenne.profile.entity

Examples of org.apache.cayenne.profile.entity.Entity3


        for (int i = 0; i < 500; i++) {
            Entity2 e = (Entity2) context.newObject(Entity2.class);
            e.setName("Name_" + i);
           
            Entity3 e31 = (Entity3) context.newObject(Entity3.class);
            e31.setName("E31_" + i);
            e31.setEntity2(e);

            Entity3 e32 = (Entity3) context.newObject(Entity3.class);
            e32.setName("E32_" + i);
            e32.setEntity2(e);
        }

        context.commitChanges();
    }
View Full Code Here


                    i * 2 + 1);

            List e3s1 = o1.getEntity3s();
            assertEquals(2, e3s1.size());

            Entity3 e311 = (Entity3) e3s1.get(0);
            Entity3 e312 = (Entity3) e3s1.get(1);

            e311.setEntity2(o2);
            e312.setEntity2(null);
            context.deleteObject(e312);
        }

        context.commitChanges();
    }
View Full Code Here

        List results = context.performQuery(q);
        assertEquals(200, results.size());

        Iterator it = results.iterator();
        while (it.hasNext()) {
            Entity3 e3 = (Entity3) it.next();
            assertTrue(e3.readPropertyDirectly("entity2") instanceof Fault);
            e3.getEntity2().getName();
            assertFalse(e3.readPropertyDirectly("entity2") instanceof Fault);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.profile.entity.Entity3

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.