Examples of newObjectIdInstance()


Examples of javax.jdo.PersistenceManager.newObjectIdInstance()

        {
            tx.begin();

            pm.getFetchPlan().addGroup( PROJECT_WITH_BUILDS_FETCH_GROUP );

            Object objectId = pm.newObjectIdInstance( Project.class, project.getId() );

            project = (Project) pm.getObjectById( objectId );

            build = (BuildResult) makePersistent( pm, build, false );
View Full Code Here

Examples of javax.jdo.PersistenceManager.newObjectIdInstance()

            Object objectId = null;

            if ( id instanceof CompoundKey )
            {
                objectId = pm.newObjectIdInstance( clazz, id.toString() );
            }
            else
            {
                objectId = pm.newObjectIdInstance( clazz, id );
            }
View Full Code Here

Examples of javax.jdo.PersistenceManager.newObjectIdInstance()

            {
                objectId = pm.newObjectIdInstance( clazz, id.toString() );
            }
            else
            {
                objectId = pm.newObjectIdInstance( clazz, id );
            }

            Object object = pm.getObjectById( objectId );

            object = pm.detachCopy( object );
View Full Code Here

Examples of javax.jdo.PersistenceManager.newObjectIdInstance()

    pm.close();

    //Check the instance existing
    pm = pmf.getPersistenceManager();
    try {
      a = (A) pm.getObjectById(pm.newObjectIdInstance(A.class, "" + 0), false);
    } catch (JDOException e) {
      fail("The A instance is not found on the data support");
    }
    Collection names = a.names();
    assertNotNull("name collection is null", names);
View Full Code Here

Examples of javax.jdo.PersistenceManager.newObjectIdInstance()

    try {
      res.beginTest();
      beginTx(pm, task, threadId, txId);
      for (int no = 0; no < ctx.nbCreDel; no++) {
        int id = (txId * ctx.nbCreDel) + no + ctx.startId;
        Object oid = pm.newObjectIdInstance(IntUserId.class, String.valueOf(id));
        pm.deletePersistent(pm.getObjectById(oid, false));
      }
      pm.currentTransaction().commit();
      res.endTest();
      logger.log(BasicLevel.DEBUG, "Deletion Tx " + txId + " finished");
View Full Code Here

Examples of javax.jdo.PersistenceManager.newObjectIdInstance()

      pm.evictAll(); //clear the L2 cache
     
            pm.currentTransaction().begin();
      IntervenantHelper ih = (IntervenantHelper) pm.getObjectById(
        pm.newObjectIdInstance(IntervenantHelper.class, "" + 2),
        false);
      assertEquals("Bad convention elements in collection",
        2,
        ih.getConventions().size());
            pm.close();
View Full Code Here

Examples of javax.jdo.PersistenceManager.newObjectIdInstance()

    ar1 = null;
    pm.currentTransaction().commit();
    pm.evictAll();
    pm.currentTransaction().begin();
    ar1 = (AutoRef) pm.getObjectById(
        pm.newObjectIdInstance(AutoRef.class, "testA_ar1"), false);
    pm.deletePersistentAll(ar1.getMyRefs());
    pm.deletePersistent(ar1.getMyRef());
    pm.deletePersistent(ar1);
    pm.currentTransaction().commit();
    pm.close();   
View Full Code Here

Examples of javax.jdo.PersistenceManager.newObjectIdInstance()

    pm.close();
    pm = pmf.getPersistenceManager();
    pm.evictAll();
    try {
      zoo = (Zoo) pm.getObjectById(
        pm.newObjectIdInstance(Zoo.class, zooName), false);
    } catch (Exception e) {
      fail("Zoo not found");
    }
    assertNotNull("Null zoo", zoo);
    Collection animals = zoo.getAnimals();
View Full Code Here

Examples of javax.jdo.PersistenceManager.newObjectIdInstance()

    pm.evictAll();
    pm.close();
    pm = pmf.getPersistenceManager();
    pm.evictAll();
    pm.currentTransaction().begin();
    H h0 = (H) pm.getObjectById(pm.newObjectIdInstance(H.class, "hid_0"), false);
    assertNotNull("Null h0", h0);
    g = h0.getG();
    assertNotNull("Null g", g);
    pm.deletePersistentAll(g.getHs());
    pm.deletePersistent(g);
View Full Code Here

Examples of javax.jdo.PersistenceManager.newObjectIdInstance()

  public void testA() {
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    Qsdfgh q0 = (Qsdfgh) pm.getObjectById(
        pm.newObjectIdInstance(Qsdfgh.class, "q0"), false);
    Qsdfgh q1 = (Qsdfgh) pm.getObjectById(
        pm.newObjectIdInstance(Qsdfgh.class, "q1"), false);
    Azerty a0 = (Azerty) pm.getObjectById(
        pm.newObjectIdInstance(Azerty.class, "a0"), false);
    a0.qsds.remove(q0);
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.