Package org.jpox.store.mapped.expression

Examples of org.jpox.store.mapped.expression.BooleanExpression


        ArrayList args = new ArrayList();
        args.add(str);
        args.add(source);
    //Cloudscape 10.0
        //LOCATE( stringSearched, SearchString, [StartPosition] )
        return new BooleanExpression(new StringExpression("LOCATE", args),ScalarExpression.OP_EQ,integerLiteral);
    }
View Full Code Here


        if (keyMapping instanceof SerialisedMapping)
        {
            // Apply condition on join-table owner field to filter by owner
            ScalarExpression keyExpr = keyMapping.newScalarExpression(stmt,stmt.getMainTableExpression());
            ScalarExpression keyVal = keyMapping.newLiteral(stmt, key).add(dba.getMapping(String.class, storeMgr).newLiteral(stmt,"%"));
            stmt.andCondition(new BooleanExpression(keyExpr,ScalarExpression.OP_LIKE,keyVal), true);            
        }
        else
        {
            // Apply condition on join-table owner field to filter by owner
            ScalarExpression keyExpr = keyMapping.newScalarExpression(stmt,stmt.getMainTableExpression());
View Full Code Here

            args.add(source);
        }
    //DB2 8 manual
        //a VARCHAR the maximum length is 4 000 bytes
        //LOCATE( CAST(stringSearched AS VARCHAR(4000)), SearchString, [StartPosition] )
        return new BooleanExpression(new StringExpression("LOCATE", args),ScalarExpression.OP_EQ,integerLiteral);
    }
View Full Code Here

        List argsOp1 = new ArrayList();
        argsOp1.add(leftOperand);       
       
        StringLiteral pct = new StringLiteral(leftOperand.getQueryExpression(), leftOperand.getMapping(), '%');
        return new BooleanExpression(new StringExpression("CAST", argsOp1, types), ScalarExpression.OP_LIKE, pct.add(leftOperand.getQueryExpression().getStoreManager().getDatastoreAdapter().getEscapedPatternExpression(rightOperand)));
    }  
View Full Code Here

        if (keyMapping instanceof SerialisedMapping)
        {
            // Apply condition on join-table owner field to filter by owner
            ScalarExpression keyExpr = keyMapping.newScalarExpression(stmt, stmt.getMainTableExpression());
            ScalarExpression keyVal = keyMapping.newLiteral(stmt, key).add(dba.getMapping(String.class, storeMgr).newLiteral(stmt,"%"));
            stmt.andCondition(new BooleanExpression(keyExpr,ScalarExpression.OP_LIKE,keyVal), true);            
        }
        else
        {
            // Apply condition on join-table owner field to filter by owner
            ScalarExpression keyExpr = keyMapping.newScalarExpression(stmt, stmt.getMainTableExpression());
View Full Code Here

                throw new QueryCompilerSyntaxException("Expected literal|parameter but got " + p.remaining(),
                    p.getIndex(), p.getInput());
            }

            // IN ((literal|parameter) [, (literal|parameter)])
            BooleanExpression eqExpr = expr.eq(inExpr);
            if (finalExpr == null)
            {
                finalExpr = eqExpr;
            }
            else
View Full Code Here

TOP

Related Classes of org.jpox.store.mapped.expression.BooleanExpression

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.