Package quickdb.complexDataStructure.model

Examples of quickdb.complexDataStructure.model.SonData


        System.out.println(customer2.getBuy().size() > 2);
        System.out.println(((Buy)customer2.getBuy().get(0)).getCodes().size() > 1);
    }

    public void complexDataStructureMainTest(){
        SonData son = new SonData();
        son.setName("son name");
        son.setSalary(5000.50);
        son.setParentValue("parent value");

        SonReference sonRef = new SonReference();
        sonRef.setDescription("description of son reference");
        sonRef.setValueReferenceParent("value from son reference parent");
        son.setReference(sonRef);

        ArrayList<Integer> phones = new ArrayList<Integer>();
        phones.add(2345543);
        phones.add(342356);
        phones.add(7564332);
        phones.add(546542168);
        son.setPhones(phones);

        ParentCollection p1 = new ParentCollection();
        p1.setNames("name1");
        ParentCollection p2 = new ParentCollection();
        p2.setNames("name2");
        ParentCollection p3 = new ParentCollection();
        p3.setNames("name3");
        ArrayList pcoll = new ArrayList();
        pcoll.add(p1);
        pcoll.add(p2);
        pcoll.add(p3);
        son.setParentCollection(pcoll);

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

        SonData son2 = new SonData();
        admin.obtain(son2).If("name").equal("son name").find();

        System.out.println(son2.getName().equals("son name"));
        System.out.println(son2.getParentValue().equalsIgnoreCase("parent value"));
        System.out.println(son2.getParentCollection().size() == 3);
        System.out.println(son2.getPhones().size() == 4);
        System.out.println(son2.getReference().getValueReferenceParent().equals("value from son reference parent"));
    }
View Full Code Here

TOP

Related Classes of quickdb.complexDataStructure.model.SonData

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.