Package quickdb.complexmodel

Examples of quickdb.complexmodel.Many1


    }

    public void testManyToMany(){
        Many2 m2a = new Many2();
        m2a.setName("many2 - a");
        Many1 m1 = new Many1();
        m1.setDescription("description1 m2a");
        Many1 m2 = new Many1();
        m2.setDescription("description2 m2a");
        ArrayList<Many1> manys1 = new ArrayList<Many1>();
        manys1.add(m1);
        manys1.add(m2);
        m2a.setMany1(manys1);

        Many2 m2b = new Many2();
        m2b.setName("many2 - b");
        Many1 m3 = new Many1();
        m3.setDescription("description3 m2b");
        Many1 m4 = new Many1();
        m4.setDescription("description4 m2b");
        ArrayList<Many1> manys2 = new ArrayList<Many1>();
        manys2.add(m3);
        manys2.add(m4);
        m2b.setMany1(manys2);

        Many1 many = new Many1();
        many.setDescription("description of principal many");
        ArrayList<Many2> m = new ArrayList<Many2>();
        m.add(m2a);
        m.add(m2b);
        many.setMany2(m);

        System.out.println(admin.save(many));

        Many1 many1 = new Many1();
        admin.obtainWhere(many1, "description = 'description of principal many'");
        System.out.println("description4 m2b".equalsIgnoreCase(((Many1)((Many2)many1.getMany2().get(1)).getMany1().get(1)).getDescription()));
    }
View Full Code Here

TOP

Related Classes of quickdb.complexmodel.Many1

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.