Examples of Suitcase


Examples of org.objectweb.speedo.pobjects.sequence.id.Suitcase

    PersistenceManager pm = pmf.getPersistenceManager();
    pm.getObjectIdClass(Suitcase.class);
    //get the sequence
    Sequence s = pm.getSequence(SUITCASE_SEQ);
    assertNotNull("Sequence " + SUITCASE_SEQ + " should not be null.", s);
    Suitcase s1 = new Suitcase();
    s1.setColor("black");
    Suitcase s2 = new Suitcase();
    s2.setColor("grey");
    logger.log(BasicLevel.DEBUG, "Value is " + s.currentValue());
    //make persistent
    pm.currentTransaction().begin();
    pm.makePersistent(s1);
    pm.makePersistent(s2);
    pm.currentTransaction().commit();
    assertTrue(s1.getId() < s2.getId());
    logger.log(BasicLevel.DEBUG, "After commit, value is " + s.currentValue());
        pm.close();
  }
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.