Package org.apache.openjpa.persistence.jdbc.common.apps

Examples of org.apache.openjpa.persistence.jdbc.common.apps.ConstantJoinPC5


  {
    deleteAll(ConstantJoinPC4.class);
    deleteAll(ConstantJoinPC5.class);

    ConstantJoinPC4 pc4 = new ConstantJoinPC4 ("pc4-1", 1);
    pc4.setOneToOne1 (new ConstantJoinPC5 ("pc5-one-to-one-1"));
    //### see note in testConstantOneToOne2
    //### pc4.setOneToOne2 (new ConstantJoinPC5 ("pc5-one-to-one-2"));
    pc4.getManyToMany ().add (new ConstantJoinPC5 ("pc5-many-to-many-1"));
    pc4.getManyToMany ().add (new ConstantJoinPC5 ("pc5-many-to-many-2"));

    EntityManager pm = currentEntityManager();
    startTx(pm);
    pm.persist(pc4);
    endTx(pm);
View Full Code Here


    EntityManager pm = currentEntityManager();
    startTx(pm);
    ConstantJoinPC4 pc4 = pm.find(ConstantJoinPC4.class, oid);
    assertEquals (2, pc4.getManyToMany ().size ());
    Iterator iter = pc4.getManyToMany ().iterator ();
    ConstantJoinPC5 pc5_1 = (ConstantJoinPC5) iter.next ();
    ConstantJoinPC5 pc5_2 = (ConstantJoinPC5) iter.next ();
    if ("pc5-many-to-many-2".equals (pc5_1.getName ()))
    {
      ConstantJoinPC5 other = pc5_1;
      pc5_1 = pc5_2;
      pc5_2 = other;
    }
    assertEquals ("pc5-many-to-many-1", pc5_1.getName ());
    assertEquals ("pc5-many-to-many-2", pc5_2.getName ());
View Full Code Here

  {
    deleteAll(ConstantJoinPC4.class);
    deleteAll(ConstantJoinPC5.class);

    ConstantJoinPC4 pc4 = new ConstantJoinPC4 ("pc4-1", 1);
    pc4.setOneToOne1 (new ConstantJoinPC5 ("pc5-one-to-one-1"));
    //### see note in testConstantOneToOne2
        //### pc4.setOneToOne2 (new ConstantJoinPC5 ("pc5-one-to-one-2"));
        pc4.getManyToMany().add (new ConstantJoinPC5 ("pc5-many-to-many-1"));
        pc4.getManyToMany().add (new ConstantJoinPC5 ("pc5-many-to-many-2"));

    EntityManager pm = currentEntityManager();
    startTx(pm);
    pm.persist(pc4);
    endTx(pm);
View Full Code Here

    EntityManager pm = currentEntityManager();
    startTx(pm);
    ConstantJoinPC4 pc4 = pm.find(ConstantJoinPC4.class, oid);
    assertEquals (2, pc4.getManyToMany ().size ());
    Iterator iter = pc4.getManyToMany ().iterator ();
    ConstantJoinPC5 pc5_1 = (ConstantJoinPC5) iter.next ();
    ConstantJoinPC5 pc5_2 = (ConstantJoinPC5) iter.next ();
    if ("pc5-many-to-many-2".equals (pc5_1.getName ()))
    {
      ConstantJoinPC5 other = pc5_1;
      pc5_1 = pc5_2;
      pc5_2 = other;
    }
    assertEquals ("pc5-many-to-many-1", pc5_1.getName ());
    assertEquals ("pc5-many-to-many-2", pc5_2.getName ());
View Full Code Here

  {
    deleteAll(ConstantJoinPC4.class);
    deleteAll(ConstantJoinPC5.class);

    ConstantJoinPC4 pc4 = new ConstantJoinPC4 ("pc4-1", 1);
    pc4.setOneToOne1 (new ConstantJoinPC5 ("pc5-one-to-one-1"));
    //### see note in testConstantOneToOne2
        //### pc4.setOneToOne2 (new ConstantJoinPC5 ("pc5-one-to-one-2"));
        pc4.getManyToMany().add (new ConstantJoinPC5 ("pc5-many-to-many-1"));
        pc4.getManyToMany().add (new ConstantJoinPC5 ("pc5-many-to-many-2"));

    EntityManager pm = currentEntityManager();
    startTx(pm);
    pm.persist(pc4);
    endTx(pm);
View Full Code Here

    EntityManager pm = currentEntityManager();
    startTx(pm);
    ConstantJoinPC4 pc4 = pm.find(ConstantJoinPC4.class, oid);
    assertEquals (2, pc4.getManyToMany ().size ());
    Iterator iter = pc4.getManyToMany ().iterator ();
    ConstantJoinPC5 pc5_1 = (ConstantJoinPC5) iter.next ();
    ConstantJoinPC5 pc5_2 = (ConstantJoinPC5) iter.next ();
    if ("pc5-many-to-many-2".equals (pc5_1.getName ()))
    {
      ConstantJoinPC5 other = pc5_1;
      pc5_1 = pc5_2;
      pc5_2 = other;
    }
    assertEquals ("pc5-many-to-many-1", pc5_1.getName ());
    assertEquals ("pc5-many-to-many-2", pc5_2.getName ());
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.jdbc.common.apps.ConstantJoinPC5

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.