Package org.objectweb.speedo.pobjects.collection

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


    }

    public void testCreateXMMB() {
        logger.log(BasicLevel.DEBUG, "Start testCreateXMMB");
        long ida = 1230;
        AMMB a = new AMMB(ida);
        ArrayList bs = new ArrayList();
        ArrayList as = new ArrayList(1);
        as.add(a);
        for(int i=0; i<5; i++) {
            BMMB b = new BMMB(ida + i);
            b.setAs(as);
            bs.add(b);
        }
        a.setBs(bs);
        PersistenceManager pm = pmf.getPersistenceManager();
        pm.makePersistent(a);
        pm.close();
    }
View Full Code Here


        Ref2AMMB[] r1 = new Ref2AMMB[NB_XMMB];
        Ref2Ref2AMMB[] r2 = new Ref2Ref2AMMB[NB_XMMB];
        AMMB[] as = new AMMB[NB_XMMB];
        BMMB[] bs = new BMMB[NB_XMMB];
        for(int i=0; i<as.length; i++) {
            as[i] = new AMMB(i);
            bs[i] = new BMMB(i);
            r1[i] = new Ref2AMMB(i*10, as[i]);
            r2[i] = new Ref2Ref2AMMB(i*100, r1[i]);
        }
        Collection as0 = new ArrayList(2);
View Full Code Here

    public void test1() {
        AMMB[] as = new AMMB[3];
        BMMB[] bs = new BMMB[3];
        for(int i=0; i<as.length; i++) {
            as[i] = new AMMB(i);
            bs[i] = new BMMB(i);
        }
        Collection as0 = new ArrayList(2);
        as0.add(bs[0]);
        as0.add(bs[1]);
View Full Code Here

                while(it.hasNext()) {
                    Object o = it.next();
                    Assert.assertNotNull("null object in the query result"
                        + cs[i].getName(), o);
                    if (o instanceof AMMB) {
                        AMMB a = (AMMB) o;
                        a.getBs().clear();
                    }
                    pm.deletePersistent(o);

                }
                query.close(col);
View Full Code Here

                while(it.hasNext()) {
                    Object o = it.next();
                    Assert.assertNotNull("null object in the query result"
                        + cs[i].getName(), o);
                    if (o instanceof AMMB) {
                        AMMB a = (AMMB) o;
                        a.getBs().clear();
                    }
                    pm.currentTransaction().begin();
                    pm.deletePersistent(o);
                    pm.currentTransaction().commit();
                }
View Full Code Here

    public void test1() {
        PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
        Object oid = pm.newObjectIdInstance(AMMB.class, "1230");
        Assert.assertNotNull("null oid !", oid);
        AMMB a = (AMMB) pm.getObjectById(oid, false);
        Assert.assertNotNull("null AMMB object", a);
        Collection bs = a.getBs();
        Assert.assertNotNull("null collection of BMMB", bs);
        Iterator it = bs.iterator();
        while(it.hasNext()) {
            BMMB b = (BMMB) it.next();
            Assert.assertNotNull("null element collection of BMMB", b);
View Full Code Here

                Object o = it.next();
                if (o == null) {
                    fail("Null object returned by the extent iterator of the class "
                            + clazz.getName());
                } else if (o instanceof AMMB) {
                    AMMB a = (AMMB) o;
                    found.add(new Long(a.getIda()));
                } else if (o instanceof BMMB) {
                    BMMB b = (BMMB) o;
                    found.add(new Long(b.getIdb()));
                } else {
                    fail("the test does not manage the class " + o.getClass().getName());
View Full Code Here

TOP

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

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.