Package org.objectweb.speedo.pobjects.sequence.id.speedoExtension

Examples of org.objectweb.speedo.pobjects.sequence.id.speedoExtension.Card


    PersistenceManager pm = pmf.getPersistenceManager();
    pm.getObjectIdClass(Card.class);
    //get the sequence
    Sequence s = pm.getSequence(CARD_SEQ);
    assertNotNull("Sequence " + CARD_SEQ + " should not be null.", s);
    Card c1 = new Card();
    c1.setName("card 1");
    Card c2 = new Card();
    c2.setName("card 2");
   
    Collection c = new ArrayList();
    c.add(c1);
    c.add(c2);
    //make persistent
    pm.currentTransaction().begin();
    pm.makePersistentAll(c);
    pm.currentTransaction().commit();
    assertTrue(c1.getId() < c2.getId());
        pm.close();
  }
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.pobjects.sequence.id.speedoExtension.Card

Copyright © 2018 www.massapicom. 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.