Package org.jpox.store.mapped.expression

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


        ArrayList args = new ArrayList();
        args.add(str);
        args.add(begin.add(getMapping(BigInteger.class, str).newLiteral(str.getQueryExpression(), BigInteger.ONE)));
        args.add(end.sub(begin));

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


    {
        ArrayList args = new ArrayList();
        args.add(str);
        args.add(begin.add(getMapping(BigInteger.class, str).newLiteral(str.getQueryExpression(), BigInteger.ONE)));

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

        ArrayList args = new ArrayList();
        args.add(str);
        args.add(begin.add(getMapping(Integer.class, str).newLiteral(str.getQueryExpression(), BigInteger.ONE)));
        args.add(end.sub(begin));

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

    public ScalarExpression concatOperator(ScalarExpression operand1, ScalarExpression operand2)
    {
        ArrayList args = new ArrayList();
        args.add(operand1);
        args.add(operand2);
        return new StringExpression("CONCAT", args);
    }
View Full Code Here

       
        ScalarExpression integerLiteral = getMapping(BigInteger.class, source).newLiteral(source.getQueryExpression(), BigInteger.ONE);
        ArrayList args = new ArrayList();
        args.add(str);
        args.add(source);
        return new BooleanExpression(new StringExpression("LOCATE", args),ScalarExpression.OP_EQ,integerLiteral);
    }
View Full Code Here

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

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

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

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

        ArrayList args = new ArrayList();
        args.add(str);

        if (leading && trailing)
        {
            return new StringExpression("TRIM", args);
        }
        else if (leading)
        {
            return new StringExpression("LTRIM", args);
        }
        else if (trailing)
        {
            return new StringExpression("RTRIM", args);
        }
        return str; // Nothing to trim
    }
View Full Code Here

    {
        ArrayList args = new ArrayList();
        args.add(str);
        args.add(begin.add(getMapping(BigInteger.class, str).newLiteral(str.getQueryExpression(), BigInteger.ONE)));

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