Examples of InnerUserId


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

        try {
      String f1 = "testInnerUserId";
      int f2 = 12;
      InnerUserId.Oid iuio = new InnerUserId.Oid(0,0);
            PersistenceManager pm = pmf.getPersistenceManager();
            InnerUserId iui = new InnerUserId(f1, f2, iuio);
            pm.makePersistent(iui);
            InnerUserId.Oid iuio2 = (InnerUserId.Oid) pm.getObjectId(iui);
            logger.log(BasicLevel.DEBUG, "UserId=" + iuio2);
            Assert.assertNotNull("identifier is null", iuio2);
            iui = null;
            pm.close();

            pm = pmf.getPersistenceManager();
            iuio2 = new InnerUserId.Oid(0, 0);
            iui = (InnerUserId) pm.getObjectById(iuio2, false);
            Assert.assertNotNull("returned object is null", iui);
            Assert.assertEquals("Bad field 'oid1' value", iuio.oid1, iui.getOid1());
            Assert.assertEquals("Bad field 'oid2' value", iuio.oid2, iui.getOid2());
            Assert.assertEquals("Bad field 'f1' value", f1, iui.getF1());
            Assert.assertEquals("Bad field 'f2' value", f2, iui.getF2());
            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.