Package org.objectweb.speedo.pobjects.collection

Examples of org.objectweb.speedo.pobjects.collection.Ref2StringSet


  public void testRef2StringSet() {
    PersistenceManager pm = pmf.getPersistenceManager();

    pm.currentTransaction().begin();
    Ref2StringSet rss = new Ref2StringSet("testRef2StringSet");
    rss.getStrings().add("str1");
    rss.getStrings().add("str2");
    rss.getStrings().add("str3");
    assertTrue("Bad return value for a new value",
      !rss.getStrings().add("str3"));
    pm.makePersistent(rss);
    pm.currentTransaction().commit();

    assertTrue("Bad return value for a new value",
      rss.getStrings().add("str4"));
    assertTrue("Bad return value for an existing value",
      !rss.getStrings().add("str3"));

    pm.currentTransaction().begin();
    pm.deletePersistent(rss);
    pm.currentTransaction().commit();
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.pobjects.collection.Ref2StringSet

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.