Examples of IntUserId


Examples of org.objectweb.speedo.pobjects.userid.IntUserId

      for (int no = 0; no < nbCreation; no++) {
        int oid = (txId * nbCreation) + no + startId;
        if (debug) {
          logger.log(BasicLevel.DEBUG, "Creating object "  + oid);
        }
        IntUserId iui = new IntUserId(oid, "Obj No " + oid);
        pm.makePersistent(iui);
      }
      commitTx(pm, task, threadId, txId);
      res.endTest();
    } catch (JDOFatalException e) {
View Full Code Here

Examples of org.objectweb.speedo.pobjects.userid.IntUserId

      res.beginTest();
      beginTx(pm, task, threadId, txId);
      if (plus > 0) {
        //The first transaction creates the additional object
        for (int oid = 0; txId == 0 && oid < plus; oid++) {
          IntUserId iui = new IntUserId(oid, "Obj No " + oid);
          pm.makePersistent(iui);
          if (gctx.keepOid) {
            gctx.oids[oid] = pm.getObjectId(iui);
          }
        }
      }
      // The other transactions create 'nbCreation' objects
      for (int no = 0; no < NB_CREATION; no++) {
        int oid = (txId * NB_CREATION) + no + plus;
        if (oid < gctx.dbSize) {
          IntUserId iui = new IntUserId(oid, "Obj No " + oid);
          pm.makePersistent(iui);
          if (gctx.keepOid) {
            gctx.oids[oid] = pm.getObjectId(iui);
          }
        }
View Full Code Here

Examples of org.objectweb.speedo.pobjects.userid.IntUserId

      for (int no = 0; no < ctx.nbCreDel; no++) {
        int oid = (txId * ctx.nbCreDel) + no + ctx.startId;
        if (debug) {
          logger.log(BasicLevel.DEBUG, "Creating object "  + oid);
        }
        IntUserId iui = new IntUserId(oid, "Obj No " + oid);
        pm.makePersistent(iui);
      }
      commitTx(pm, task, threadId, txId);
      res.endTest();
    } catch (JDOFatalException e) {
View Full Code Here

Examples of org.objectweb.speedo.pobjects.userid.IntUserId

        try {
            String f1 = "testInt";
            int name = 13;
            Object id;
            PersistenceManager pm = pmf.getPersistenceManager();
            IntUserId iui = new IntUserId(name, f1);
            pm.makePersistent(iui);
            id = pm.getObjectId(iui);
            Assert.assertNotNull("identifier is null", id);
            pm.close();
            iui = null; // garbage object
            pm = pmf.getPersistenceManager();
            id = pm.newObjectIdInstance(IntUserId.class, id.toString());
            Assert.assertNotNull("built identifier is null", id);
            iui = (IntUserId) pm.getObjectById(id, false);
            Assert.assertNotNull("returned object is null", iui);
            Assert.assertEquals("Bad field 'name' value", name, iui.getName());
            Assert.assertEquals("Bad field 'f1' value", f1, iui.getF1());
            pm.currentTransaction().begin();
            pm.deletePersistent(iui);
            pm.currentTransaction().commit();
            pm.close();
        } catch (Exception e) {
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.