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

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


            pm.makePersistent(g);
        }
       
        //creation of mailinglists
        for(int i=0; i<NB_GROUP; i++) {
            MailingList ml = new MailingList("mailinglist_" + i);
            Collection users = ml.getUsers();
            for(int j=0; j<NB_USER_PER_GROUP; j++) {
                GroupUser u = new GroupUser("user_ml" + i + "_u" + j);
                users.add(u);
            }
            Collection moderators = ml.getModerators();
            for(int j=0; j<NB_USER_PER_GROUP; j++) {
                GroupModerator gm = new GroupModerator("moderator_ml" + i,  "mod" + j);
                moderators.add(gm);
            }
            pm.makePersistent(ml);
View Full Code Here


        q.declareVariables("GroupModerator gm");
        q.setFilter("!(this.moderators.contains(gm)) && (gm.firstName == p1) && (gm.lastName == p2)");
        Collection c = (Collection) q.execute("moderator_ml0", "mod0");
        Collection founds = new ArrayList(c.size());
        for (Iterator iter = c.iterator(); iter.hasNext();) {
            MailingList ml = (MailingList) iter.next();
            founds.add(ml.getName());
        }
        q.closeAll();
        pm.close();
        assertSameCollection("Bad group found",
                Arrays.asList(new String[]{"mailinglist_1", "mailinglist_2"}),
View Full Code Here

TOP

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

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.