Package quickdb.query.model

Examples of quickdb.query.model.ObjectSummary


    public void testSummaryAttributes(){
        if(this.admin.checkTableExist("ObjectSummary")){
            this.admin.executeQuery("DROP TABLE ObjectSummary");
        }

        ObjectSummary summ = new ObjectSummary();
        summ.setValue(23);
        summ.setSalary(100.5);
        System.out.println(admin.save(summ));

        ObjectSummary summ2 = new ObjectSummary();
        summ2.setValue(5);
        summ2.setSalary(500.5);
        System.out.println(admin.save(summ2));

        ObjectSummary summ3 = new ObjectSummary();
        summ3.setValue(34);
        summ3.setSalary(200);
        System.out.println(admin.save(summ3));

        ObjectSummary summ4 = new ObjectSummary();
        admin.obtain(summ4).If("value").greater(2).find();
        System.out.println(62.0 == summ4.getSummmary());
        System.out.println(267.0 == summ4.getPromSalary());
        System.out.println(34.0 == summ4.getMaxValue());
        System.out.println(5.0 == summ4.getMinValue());
        System.out.println(3.0 == summ4.getCountValue());

        ObjectSummary summ5 = new ObjectSummary();
        admin.obtain(summ5, "value > 10");
        System.out.println(57.0 == summ5.getSummmary());
        System.out.println(150.25 == summ5.getPromSalary());
        System.out.println(34.0 == summ5.getMaxValue());
        System.out.println(23.0 == summ5.getMinValue());
        System.out.println(2.0 == summ5.getCountValue());
    }
View Full Code Here


    public void testQueryIfGroupWithSummary(){
        if(this.admin.checkTableExist("ObjectSummary")){
            System.out.println(this.admin.executeQuery("DROP TABLE ObjectSummary"));
        }

        ObjectSummary summ = new ObjectSummary();
        summ.setValue(23);
        summ.setSalary(100.5);
        System.out.println(admin.save(summ));

        ObjectSummary summ2 = new ObjectSummary();
        summ2.setValue(5);
        summ2.setSalary(500.5);
        System.out.println(admin.save(summ2));

        ObjectSummary summ3 = new ObjectSummary();
        summ3.setValue(34);
        summ3.setSalary(200);
        System.out.println(admin.save(summ3));

        ObjectSummary summ4 = new ObjectSummary();
        summ4.setValue(23);
        summ4.setSalary(10);
        System.out.println(admin.save(summ4));

        ObjectSummary summ5 = new ObjectSummary();
        summ5.setValue(5);
        summ5.setSalary(55);
        System.out.println(admin.save(summ5));

        ObjectSummary summ6 = new ObjectSummary();
        summ6.setValue(34);
        summ6.setSalary(800);
        System.out.println(admin.save(summ6));

        ObjectSummary summ7 = new ObjectSummary();
        admin.obtain(summ7).If("id").greater(0).group("value").ifGroup("+salary").greater(900).find();

        System.out.println(34.0 == summ7.getMaxValue());
        System.out.println(34.0 == summ7.getMinValue());
        System.out.println(2.0 == summ7.getCountValue());
        System.out.println(500.0 == summ7.getPromSalary());
        System.out.println(68.0 == summ7.getSummmary());
    }
View Full Code Here

TOP

Related Classes of quickdb.query.model.ObjectSummary

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.