Package javax.jdo.datastore

Examples of javax.jdo.datastore.Sequence.currentValue()


    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();
View Full Code Here


    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();
  }
 
  /**
   * Get a non-rdb sequence and use it to make objects persistent.
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.