Package org.apache.cayenne.exp

Examples of org.apache.cayenne.exp.Expression.match()


        noMatch.setEstimatedPrice(new BigDecimal(10001));
        assertFalse("Failed: " + e, e.match(noMatch));

        Painting noMatch1 = new Painting();
        noMatch1.setEstimatedPrice(new BigDecimal(10000));
        assertFalse("Failed: " + e, e.match(noMatch1));

        Painting match = new Painting();
        match.setEstimatedPrice(new BigDecimal(9999));
        assertTrue("Failed: " + e, e.match(match));
    }
View Full Code Here


        noMatch1.setEstimatedPrice(new BigDecimal(10000));
        assertFalse("Failed: " + e, e.match(noMatch1));

        Painting match = new Painting();
        match.setEstimatedPrice(new BigDecimal(9999));
        assertTrue("Failed: " + e, e.match(match));
    }

    public void testEvaluateLESS_THAN_EQUAL_TO() throws Exception {
        Expression e = new ASTLessOrEqual(new ASTObjPath("estimatedPrice"), new BigDecimal(10000d));
View Full Code Here

    public void testEvaluateLESS_THAN_EQUAL_TO() throws Exception {
        Expression e = new ASTLessOrEqual(new ASTObjPath("estimatedPrice"), new BigDecimal(10000d));

        Painting noMatch = new Painting();
        noMatch.setEstimatedPrice(new BigDecimal(10001));
        assertFalse(e.match(noMatch));

        Painting match1 = new Painting();
        match1.setEstimatedPrice(new BigDecimal(10000));
        assertTrue(e.match(match1));
View Full Code Here

        noMatch.setEstimatedPrice(new BigDecimal(10001));
        assertFalse(e.match(noMatch));

        Painting match1 = new Painting();
        match1.setEstimatedPrice(new BigDecimal(10000));
        assertTrue(e.match(match1));

        Painting match = new Painting();
        match.setEstimatedPrice(new BigDecimal(9999));
        assertTrue("Failed: " + e, e.match(match));
    }
View Full Code Here

        match1.setEstimatedPrice(new BigDecimal(10000));
        assertTrue(e.match(match1));

        Painting match = new Painting();
        match.setEstimatedPrice(new BigDecimal(9999));
        assertTrue("Failed: " + e, e.match(match));
    }

    public void testEvaluateGREATER_THAN() throws Exception {
        Expression e = new ASTGreater(new ASTObjPath("estimatedPrice"), new BigDecimal(10000d));
View Full Code Here

    public void testEvaluateGREATER_THAN() throws Exception {
        Expression e = new ASTGreater(new ASTObjPath("estimatedPrice"), new BigDecimal(10000d));

        Painting noMatch = new Painting();
        noMatch.setEstimatedPrice(new BigDecimal(9999));
        assertFalse(e.match(noMatch));

        Painting noMatch1 = new Painting();
        noMatch1.setEstimatedPrice(new BigDecimal(10000));
        assertFalse(e.match(noMatch1));
View Full Code Here

        noMatch.setEstimatedPrice(new BigDecimal(9999));
        assertFalse(e.match(noMatch));

        Painting noMatch1 = new Painting();
        noMatch1.setEstimatedPrice(new BigDecimal(10000));
        assertFalse(e.match(noMatch1));

        Painting match = new Painting();
        match.setEstimatedPrice(new BigDecimal(10001));
        assertTrue("Failed: " + e, e.match(match));
    }
View Full Code Here

        noMatch1.setEstimatedPrice(new BigDecimal(10000));
        assertFalse(e.match(noMatch1));

        Painting match = new Painting();
        match.setEstimatedPrice(new BigDecimal(10001));
        assertTrue("Failed: " + e, e.match(match));
    }

    public void testEvaluateGREATER_THAN_EQUAL_TO() throws Exception {
        Expression e = new ASTGreaterOrEqual(new ASTObjPath("estimatedPrice"), new BigDecimal(10000d));
View Full Code Here

    public void testEvaluateGREATER_THAN_EQUAL_TO() throws Exception {
        Expression e = new ASTGreaterOrEqual(new ASTObjPath("estimatedPrice"), new BigDecimal(10000d));

        Painting noMatch = new Painting();
        noMatch.setEstimatedPrice(new BigDecimal(9999));
        assertFalse(e.match(noMatch));

        Painting match1 = new Painting();
        match1.setEstimatedPrice(new BigDecimal(10000));
        assertTrue(e.match(match1));
View Full Code Here

        noMatch.setEstimatedPrice(new BigDecimal(9999));
        assertFalse(e.match(noMatch));

        Painting match1 = new Painting();
        match1.setEstimatedPrice(new BigDecimal(10000));
        assertTrue(e.match(match1));

        Painting match = new Painting();
        match.setEstimatedPrice(new BigDecimal(10001));
        assertTrue("Failed: " + e, e.match(match));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.