Package quickdb.query.model

Examples of quickdb.query.model.CompleteQuery


            another.setMount(55.35);
            another.setProperty("son name");
            another.setDescription("parent description");
            this.admin.save(another);

            CompleteQuery query = new CompleteQuery();
            query.setName("diego sarmentero");
            query.setSalary(3500.50);
            query.setAge(20);
            query.setBirth(new java.sql.Date(85, 9, 2));
            query.setCond(true);

            this.admin.save(query);

            CompleteQuery query2 = new CompleteQuery();
            query2.setName("cat");
            query2.setAge(24);
            query2.setSalary(1500.50);
            query2.setBirth(new java.sql.Date(104, 4, 20));
            query2.setCond(false);

            this.admin.save(query2);
        }
       
        System.out.println("testBetweenAndLower");
View Full Code Here


        System.out.println("son value".equalsIgnoreCase(user.getReference().getValue()));
    }

    public void testMatchOrNotEqual(){
        CompleteQuery query = new CompleteQuery();

        ArrayList array = admin.obtain(query).If("name").
                match("diego sarmentero").or("cond").notEqual(true).findAll();

        System.out.println(2 == array.size());
View Full Code Here

        System.out.println(2 == array.size());
    }

    public void testBetweenAndLower(){
        CompleteQuery query = new CompleteQuery();

        ArrayList array = admin.obtain(query).If("birth").inRange("1980-01-01", "2010-12-31").
                and("salary").lower(2000).findAll();

        System.out.println(1 == array.size());
View Full Code Here

        System.out.println(1 == array.size());
    }

    public void testInOrMatch(){
        CompleteQuery query = new CompleteQuery();

        ArrayList array = admin.obtain(query).If("age").in(22, 23, 24, 25).
                or("name").match("sarmentero").findAll();

        System.out.println(2 == array.size());
View Full Code Here

        System.out.println(2 == array.size());
    }

    public void testIsNotNullAndGreater(){
        CompleteQuery query = new CompleteQuery();

        ArrayList array = admin.obtain(query).If("name").isNotNull().
                and("salary").equalORgreater(2000).findAll();

        System.out.println(1 == array.size());
View Full Code Here

        System.out.println(1 == array.size());
    }

    public void testSort(){
        CompleteQuery query = new CompleteQuery();

        ArrayList array = admin.obtain(query).sort(true, "salary").findAll();

        System.out.println("cat".equalsIgnoreCase(((CompleteQuery)array.get(0)).getName()));
    }
View Full Code Here

        System.out.println("cat".equalsIgnoreCase(((CompleteQuery)array.get(0)).getName()));
    }

    public void testGroupHaving(){
        CompleteQuery query = new CompleteQuery();

        ArrayList array = admin.obtain(query).If("age").greater(10).
                group("salary").ifGroup("salary").greater(2000).findAll();

        System.out.println(1 == array.size());
View Full Code Here

        System.out.println(1 == array.size());
    }

    public void testDateMonthEqual(){
        CompleteQuery query = new CompleteQuery();

        ArrayList array = admin.obtain(query).If("birth").date().month().equal(5).findAll();

        System.out.println(1 == array.size());
        System.out.println("cat".equalsIgnoreCase(((CompleteQuery)array.get(0)).getName()));
View Full Code Here

        System.out.println(1 == array.size());
        System.out.println("cat".equalsIgnoreCase(((CompleteQuery)array.get(0)).getName()));
    }

    public void testDateDayLower(){
        CompleteQuery query = new CompleteQuery();

        ArrayList array = admin.obtain(query).If("birth").date().
                day().lower(21).findAll();

        System.out.println(2 == array.size());
View Full Code Here

        System.out.println(2 == array.size());
    }

    public void testDateDifferenceWith(){
        CompleteQuery query = new CompleteQuery();

        ArrayList array = admin.obtain(query).If("birth").date().
                differenceWith("20040522").equal(2).findAll();

        System.out.println(1 == array.size());
View Full Code Here

TOP

Related Classes of quickdb.query.model.CompleteQuery

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.