Package org.teiid.language

Examples of org.teiid.language.Like


    public void testGetLeftExpression() throws Exception {
        assertNotNull(example("abc", '.', false).getLeftExpression()); //$NON-NLS-1$
    }

    public void testGetRightExpression() throws Exception {
        Like like = example("abc", '.', false); //$NON-NLS-1$
        assertNotNull(like.getRightExpression());
        assertTrue(like.getRightExpression() instanceof Literal);
        assertEquals("abc", ((Literal)like.getRightExpression()).getValue()); //$NON-NLS-1$
    }
View Full Code Here


    Like translate(MatchCriteria criteria) {
        Character escapeChar = null;
        if(criteria.getEscapeChar() != MatchCriteria.NULL_ESCAPE_CHAR) {
            escapeChar = new Character(criteria.getEscapeChar());
        }
        return new Like(translate(criteria.getLeftExpression()),
                                    translate(criteria.getRightExpression()),
                                    escapeChar,
                                    criteria.isNegated());
    }
View Full Code Here

TOP

Related Classes of org.teiid.language.Like

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.