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

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


  public void setUp ()
  {
    deleteAll(CustomMappingPC.class);

    CustomMappingPC pc = new CustomMappingPC (2);
    pc.setName ("name");
    pc.setFemale (true);

    EntityManager pm = currentEntityManager();
    startTx(pm);
    pm.persist(pc);
    endTx(pm);
    _oid = pc.getId();
    endEm(pm);
  }
View Full Code Here


  }

  public void testInsert ()
  {
    EntityManager pm = currentEntityManager();
    CustomMappingPC pc = pm.find(CustomMappingPC.class, _oid);
    assertNotNull (pc);

    assertEquals ("name", pc.getName ());
    assertEquals (true, pc.isFemale ());
    endEm(pm);
  }
View Full Code Here

  public void testUpdate ()
  {
    EntityManager pm = currentEntityManager();
    startTx(pm);
    CustomMappingPC pc = pm.find(CustomMappingPC.class, _oid);

    pc.setName ("name2");
    pc.setFemale (false);
    endTx(pm);
    endEm(pm);

    pm = currentEntityManager();
    startTx(pm);
    pc = pm.find(CustomMappingPC.class, _oid);
    assertEquals ("name2", pc.getName ());
    assertTrue (!pc.isFemale ());
    endTx(pm);
    endEm(pm);
  }
View Full Code Here

  public void setUp ()
  {
    deleteAll(CustomMappingPC.class);

    CustomMappingPC pc = new CustomMappingPC (2);
    pc.setName ("name");
    pc.setFemale (true);

    EntityManager pm = currentEntityManager();
    startTx(pm);
    pm.persist(pc);
    endTx(pm);
    _oid = pc.getId();
    endEm(pm);
  }
View Full Code Here

  }

  public void testInsert ()
  {
    EntityManager pm = currentEntityManager();
    CustomMappingPC pc = pm.find(CustomMappingPC.class, _oid);
    assertNotNull (pc);

    assertEquals ("name", pc.getName ());
    assertEquals (true, pc.isFemale ());
    endEm(pm);
  }
View Full Code Here

  public void testUpdate ()
  {
    EntityManager pm = currentEntityManager();
    startTx(pm);
    CustomMappingPC pc = pm.find(CustomMappingPC.class, _oid);

    pc.setName ("name2");
    pc.setFemale (false);
    endTx(pm);
    endEm(pm);

    pm = currentEntityManager();
    startTx(pm);
    pc = pm.find(CustomMappingPC.class, _oid);
    assertEquals ("name2", pc.getName ());
    assertTrue (!pc.isFemale ());
    endTx(pm);
    endEm(pm);
  }
View Full Code Here

  public void setUp ()
  {
    deleteAll(CustomMappingPC.class);

    CustomMappingPC pc = new CustomMappingPC (2);
    pc.setName ("name");
    pc.setFemale (true);

    EntityManager pm = currentEntityManager();
    startTx(pm);
    pm.persist(pc);
    endTx(pm);
    _oid = pc.getId();
    endEm(pm);
  }
View Full Code Here

  }

  public void testInsert ()
  {
    EntityManager pm = currentEntityManager();
    CustomMappingPC pc = pm.find(CustomMappingPC.class, _oid);
    assertNotNull (pc);

    assertEquals ("name", pc.getName ());
    assertEquals (true, pc.isFemale ());
    endEm(pm);
  }
View Full Code Here

  public void testUpdate ()
  {
    EntityManager pm = currentEntityManager();
    startTx(pm);
    CustomMappingPC pc = pm.find(CustomMappingPC.class, _oid);

    pc.setName ("name2");
    pc.setFemale (false);
    endTx(pm);
    endEm(pm);

    pm = currentEntityManager();
    startTx(pm);
    pc = pm.find(CustomMappingPC.class, _oid);
    assertEquals ("name2", pc.getName ());
    assertTrue (!pc.isFemale ());
    endTx(pm);
    endEm(pm);
  }
View Full Code Here

TOP

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

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.