Package org.jpox.store.mapped.expression

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


        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


            return new StringLiteral(expr.getQueryExpression(),m,((Literal)expr).getValue().toString());           
        }
        List args = new ArrayList();
        args.add(expr);
        List argsRTRIM = new ArrayList();
        argsRTRIM.add(new StringExpression("CHAR", args));               
        return new StringExpression("RTRIM",argsRTRIM);
    }   
View Full Code Here

        List argsOp2 = new ArrayList();
        argsOp2.add(operand2);       
       
        List args = new ArrayList();
        args.add(super.concatOperator(new StringExpression("CAST", argsOp1, types), new StringExpression("CAST", argsOp2, types)));       

        return new StringExpression("CAST", args, types);
    }   
View Full Code Here

            args.add(str);
        }
        args.add(begin.add(getMapping(BigInteger.class, str).newLiteral(str.getQueryExpression(), BigInteger.ONE)));
    //DB2 8.0 manual
        //SUBSTR( string, start )
        return new StringExpression("SUBSTR", args);
    }
View Full Code Here

        }
        args.add(begin.add(getMapping(BigInteger.class, str).newLiteral(str.getQueryExpression(), BigInteger.ONE)));
        args.add(end.sub(begin));
    //DB2 8.0
        //SUBSTR( string, start, length )
        return new StringExpression("SUBSTR", args);
    }
View Full Code Here

    {
        ArrayList args = new ArrayList();
        args.add(str);
        if (leading && trailing)
        {
            StringExpression strExpr = new StringExpression("RTRIM", args);
            args.clear();
            args.add(strExpr);
            return new StringExpression("LTRIM", args);
        }
        else if (leading)
        {
            return new StringExpression("LTRIM", args);
        }
        else if (trailing)
        {
            return new StringExpression("RTRIM", args);
        }
        return str;
    }
View Full Code Here

        args.add(source);
        List argsOp0 = new ArrayList();
        argsOp0.add(str);       
        List types = new ArrayList();
        types.add("VARCHAR(4000)"); // max 4000 according DB2 docs       
        args.add(new StringExpression("CAST", argsOp0, types));
        if (from != null)
        {
            types = new ArrayList();
            types.add("BIGINT");       
View Full Code Here

    {
        List args = new ArrayList();
        args.add(expr);       
        List types = new ArrayList();
        types.add("VARCHAR(32672)");       
        return new StringExpression("CAST", args, types);       
    }
View Full Code Here

        ArrayList args = new ArrayList();
        args.add(expr);
        args.add(toExpr);
        args.add(fromExpr);

        return new StringExpression("TRANSLATE", args);
    }   
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

TOP

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

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.