Package com.google.appengine.datanucleus.test.jpa.SingleTableInheritanceJPA

Examples of com.google.appengine.datanucleus.test.jpa.SingleTableInheritanceJPA.Embedded1


    Assert.assertTrue(c11.getChild11Manys().isEmpty());
    startEnd.end();

    //  create Child12
    Child11Many c12m = new Child11Many("Child11ManyStr");
    Child12 c12 = newChild12(startEnd, "Child12", null, 112, null, new Embedded1("Child12Embedded1"), c12m);
    Long c12Id = c12.getId();
    String c12mId = c12m.getId();
    Key c12Key = KeyFactory.createKey(PARENT_KIND, c12Id);
   
    //  verify Child12 entity
View Full Code Here


    testUpdateDependent(NEW_EM_START_END);
  }
  @SuppressWarnings("unchecked")
  private void testUpdateDependent(StartEnd startEnd) throws Exception {
    //  create Child12
    Child12 c12_0 = newChild12(startEnd, "A", null, 12, null, new Embedded1("Child12Embedded1(1)"));
    Long c12_0Id = c12_0.getId();
    Key c12_0key = KeyFactory.createKey(PARENT_KIND, c12_0Id);
   
    //  add a Child11Many to Child12
    startEnd.start();
    c12_0 = em.find(Child12.class, c12_0Id);
    Assert.assertTrue(c12_0.getChild11Manys().isEmpty());
    Assert.assertEquals("Child12Embedded1(1)",c12_0.getEmbedded1().getStr());
    Child11Many c12m_0 = new Child11Many("Child12Embedded1(1)/Child11ManyStr(1)");
    c12_0.getChild11Manys().add(c12m_0);
    startEnd.end();
    String c12m_0Id = c12m_0.getId();
   
    // more objects to prove we update and delete the correct one
    newChild12(startEnd, "B", null, 121, null, new Embedded1("Child12Embedded1(2)"), new Child11Many("Child12Embedded1(2)/Child11ManyStr(1)"));
   
    Assert.assertEquals(2, countForKind(PARENT_KIND));
    Assert.assertEquals(2, countForClass(Child11Many.class));
   
    //  check the key of  Child11Many in the Entity
View Full Code Here

  @SuppressWarnings("unchecked")
  private void testQueryChildren(StartEnd startEnd) {
    Child11 c11_0 = newChild11(startEnd, "Child11", 11);
    Long c11Id = c11_0.getId();
   
    Child12 c12_0 = newChild12(startEnd, "Child12", 111, 112, null, new Embedded1("Child12Embedded1"));
    Long c12_0Id = c12_0.getId();

    newChild12(startEnd, "Child12", 111, 112, null, null);

    startEnd.start();
View Full Code Here

  @SuppressWarnings("unchecked")
  private void testQueryParentAndChildren(StartEnd startEnd) {
    Child11 c11 = newChild11(startEnd, "A", 111);
    Long c11Id = c11.getId();

    Child12 c12 = newChild12(startEnd, "B", 112, 211, 8.15f, new Embedded1("Embedded1"),
  new Child11Many("Child12(2)/Child11Many"));
    Long c12Id = c12.getId();
   
    Parent p = newParent(startEnd, "C");
    Long pId = p.getId();
View Full Code Here

TOP

Related Classes of com.google.appengine.datanucleus.test.jpa.SingleTableInheritanceJPA.Embedded1

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.