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

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



  private static Object insertData (EntityManager pm)
  {
    InvertA a;
    InvertB b;
    a = new InvertA (1);
    b = new InvertB (2);
    a.setTest ("testA");
    b.setTest ("testB");
    b.setInvertA (a);

    EntityTransaction t = pm.getTransaction ();
    t.begin ();
    pm.persist(b);
    //pm.makeTransactional (b);
View Full Code Here



  public void testLoad ()
  {
    InvertA a;
    InvertB b;
    Object aId;
    Object bId;

    EntityManager pm = currentEntityManager();
    aId = insertData (pm);
    endTx(pm);
    endEm(pm);

    pm = currentEntityManager();
    startTx(pm);
    b = (InvertB) aId;

    assertNotNull(b.getInvertA().getTest());
    assertEquals (b.getInvertA().getTest (), "testA");
  }
View Full Code Here


  private static Object insertData (EntityManager pm)
  {
    InvertA a;
    InvertB b;
    a = new InvertA (1);
    b = new InvertB (2);
    a.setTest ("testA");
    b.setTest ("testB");
    b.setInvertA (a);

    EntityTransaction t = pm.getTransaction ();
    t.begin ();
    pm.persist(b);
    //pm.makeTransactional (b);
View Full Code Here


  public void testLoad ()
  {
    InvertA a;
    InvertB b;
    Object aId;
    Object bId;

    EntityManager pm = currentEntityManager();
    aId = insertData (pm);
    endTx(pm);
    endEm(pm);

    pm = currentEntityManager();
    startTx(pm);
    b = (InvertB) aId;

    assertNotNull(b.getInvertA().getTest());
    assertEquals (b.getInvertA().getTest (), "testA");
  }
View Full Code Here


  private static Object insertData (EntityManager pm)
  {
    InvertA a;
    InvertB b;
    a = new InvertA (1);
    b = new InvertB (2);
    a.setTest ("testA");
    b.setTest ("testB");
    b.setInvertA (a);

    EntityTransaction t = pm.getTransaction ();
    t.begin ();
    pm.persist(b);
    //pm.makeTransactional (b);
View Full Code Here


  public void testLoad ()
  {
    InvertA a;
    InvertB b;
    Object aId;
    Object bId;

    EntityManager pm = currentEntityManager();
    aId = insertData (pm);
    endTx(pm);
    endEm(pm);

    pm = currentEntityManager();
    startTx(pm);
    b = (InvertB) aId;

    assertNotNull(b.getInvertA().getTest());
    assertEquals (b.getInvertA().getTest (), "testA");
  }
View Full Code Here

TOP

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

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.