Package play.modules.morphia

Examples of play.modules.morphia.AggregationResult


        assertSame(20L, maxScore);
       
        maxScore = Account.q("region", "AU").max("score");
        assertSame(20L, maxScore);
       
        AggregationResult r = Account.groupMax("score", "region", "department");
        assertSame(20L, r.getResult("region,department", "AU", "SA"));
        assertSame(12L, r.getResult("region,department", "CN", "IT"));
    }
View Full Code Here


        setUpAggregation();
       
        assertSame(10L, Account._min("score"));
        assertSame(12L, Account.q("region", "CN").min("score"));
       
        AggregationResult r = Account.groupMin("score", "department");
        assertSame(18L, r.getResult("department", "SA"));
       
    }
View Full Code Here

    public void testAverage() {
        setUpAggregation();

        assertSame(15L, Account._average("score"));
       
        AggregationResult r = Account.groupAverage("score", "department");
        assertSame(19L, r.getResult("department", "SA"));
    }
View Full Code Here

    }
   
    @Test
    public void testCount() {
        setUpAggregation();
        AggregationResult r = Account.groupCount("score", "region");
        assertSame(2L, r.getResult("region", "CN"));
    }
View Full Code Here

TOP

Related Classes of play.modules.morphia.AggregationResult

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.