Examples of ConstantJoinPC4


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

  public void setUp ()
  {
    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);
    oid = pc4.getId();
    endEm(pm);
  }
View Full Code Here

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

  public void testConstantManyToMany ()
  {
    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;
View Full Code Here

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

  public void testConstantOneToOne1 ()
  {
    EntityManager pm = currentEntityManager();
    startTx(pm);
    ConstantJoinPC4 pc4 =  pm.find(ConstantJoinPC4.class, oid);
    assertEquals (2, pc4.getManyToMany ().size ());
    assertEquals ("pc5-one-to-one-1", pc4.getOneToOne1 ().getName ());

    endTx(pm);
    endEm(pm);
  }
View Full Code Here

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

  }

  public void testSharedJoinTableModifications ()
  {
    EntityManager pm = currentEntityManager();
    ConstantJoinPC4 pc4 = pm.find(ConstantJoinPC4.class, oid);
    startTx(pm);
    pc4.getManyToMany ().clear ();
    endTx(pm);

    EntityManager pm2 = currentEntityManager();
    pc4 = pm2.find(ConstantJoinPC4.class, oid);
    assertNotNull (pc4.getOneToOne1 ());
    assertEquals (0, pc4.getManyToMany ().size ());
  }
View Full Code Here

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

  public void setUp ()
  {
    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);
    oid = pc4.getId();
    endEm(pm);
  }
View Full Code Here

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

  public void testConstantManyToMany ()
  {
    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;
View Full Code Here

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

  public void testConstantOneToOne1 ()
  {
    EntityManager pm = currentEntityManager();
    startTx(pm);
    ConstantJoinPC4 pc4 =  pm.find(ConstantJoinPC4.class, oid);
    assertEquals (2, pc4.getManyToMany ().size ());
        assertEquals ("pc5-one-to-one-1", pc4.getOneToOne1().getName());

    endTx(pm);
    endEm(pm);
  }
View Full Code Here

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

  }

  public void testSharedJoinTableModifications ()
  {
    EntityManager pm = currentEntityManager();
    ConstantJoinPC4 pc4 = pm.find(ConstantJoinPC4.class, oid);
    startTx(pm);
    pc4.getManyToMany ().clear ();
    endTx(pm);

    EntityManager pm2 = currentEntityManager();
    pc4 = pm2.find(ConstantJoinPC4.class, oid);
    assertNotNull (pc4.getOneToOne1 ());
    assertEquals (0, pc4.getManyToMany ().size ());
  }
View Full Code Here

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

  public void setUp ()
  {
    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);
    oid = pc4.getId();
    endEm(pm);
  }
View Full Code Here

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

  public void testConstantManyToMany ()
  {
    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;
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.