Package org.objectweb.speedo.pobjects.inheritance.query

Examples of org.objectweb.speedo.pobjects.inheritance.query.NewsGroup


 
    public void notContainsInheritanceABuilder() {
      PersistenceManager pm = pmf.getPersistenceManager();
      pm.currentTransaction().begin();
      //add newsgroup_0 -> [user_0and2]
      NewsGroup ng0 = new NewsGroup("newsgroup_0");
        Collection users = ng0.getUsers();
        users.add(commonUser);
        pm.makePersistent(ng0);
        //add newsgroup_1 -> [user_1]
        NewsGroup ng1 = new NewsGroup("newsgroup_1");
        users = ng1.getUsers();
        users.add(new GroupUser("user_1"));
        pm.makePersistent(ng1);
        pm.currentTransaction().commit();
        pm.close();
    }
View Full Code Here


   
    public void notContainsInheritanceBBuilder() {
        notContainsInheritanceABuilder();
      PersistenceManager pm = pmf.getPersistenceManager();
      //add newsgroup_2 -> [user_0and2]
      NewsGroup ng = new NewsGroup("newsgroup_2");
      Collection users = ng.getUsers();
      users.add(commonUser);
      pm.makePersistent(ng);
      pm.close();
    }
View Full Code Here

   
    public void notContainsInheritanceCBuilder() {
        notContainsInheritanceBBuilder();
      PersistenceManager pm = pmf.getPersistenceManager();
      //add newsgroup_3 -> [empty]
      NewsGroup ng = new NewsGroup("newsgroup_3");
      pm.makePersistent(ng);
        pm.close();
    }
View Full Code Here

        q.declareVariables("GroupUser u");
        q.setFilter("!(this.users.contains(u)) && (u.name == p1)");
        Collection c = (Collection) q.execute(parameter);
        Collection founds = new ArrayList(c.size());
        for (Iterator iter = c.iterator(); iter.hasNext();) {
            NewsGroup ng = (NewsGroup) iter.next();
            founds.add(ng.getName());
        }
        q.closeAll();
        pm.close();
        assertSameCollection("Bad group found",
                Arrays.asList(resultExpected),
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.pobjects.inheritance.query.NewsGroup

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.