Examples of StringExpression


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

    {
        ArrayList args = new ArrayList();
        args.add(time);
        args.add(new StringLiteral(time.getQueryExpression(),null,"%S"));
        ArrayList args0 = new ArrayList();
        args0.add(new StringExpression("TO_CHAR",args));
        ArrayList types = new ArrayList();
        types.add("INTEGER");
        return new NumericExpression("CAST",args0,types);
    }   
View Full Code Here

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)));
        //Cloudscape 10.0
        //SUBSTR( string, start )
        return new StringExpression("SUBSTR", args);
    }
View Full Code Here

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

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

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

        args.add(source);
        args.add(str);
        ScalarExpression literal = getMapping(BigInteger.class, source).newLiteral(source.getQueryExpression(), BigInteger.ZERO);
        args.add(literal);
        //JPOX_STRPOS( SearchString, stringSearched, [StartPosition] )
        return new BooleanExpression(new StringExpression("JPOX_STRPOS", args),ScalarExpression.OP_EQ,integerLiteral);
    }
View Full Code Here

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

        args.add(leftOperand);
        args.add(rightOperand);
        ScalarExpression literal = getMapping(BigInteger.class, leftOperand).newLiteral(leftOperand.getQueryExpression(), BigInteger.ZERO);
        args.add(literal);
        //JPOX_STRPOS( SearchString, stringSearched, [StartPosition] )
        return new BooleanExpression(new StringExpression("JPOX_STRPOS", args),ScalarExpression.OP_EQ,lengthMethod((StringExpression)leftOperand).sub(lengthMethod((StringExpression)rightOperand)).add(integerLiteral).encloseWithInParentheses());
    }
View Full Code Here

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)));

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

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("SUBSTR", args);
    }
View Full Code Here

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

        ArrayList args = new ArrayList();
        args.add(date);
        args.add(getMapping(String.class, date).newLiteral(date.getQueryExpression(), "DD"));

        ArrayList args1 = new ArrayList();
        args1.add(new StringExpression("TO_CHAR", args));

        return new NumericExpression("TO_NUMBER", args1);
    }
View Full Code Here

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

        ArrayList args = new ArrayList();
        args.add(date);
        args.add(getMapping(String.class, date).newLiteral(date.getQueryExpression(), "MM"));

        ArrayList args1 = new ArrayList();
        args1.add(new StringExpression("TO_CHAR", args));

        // Delete one from the SQL "month" (origin=1) to be compatible with Java month (origin=0)
        JavaTypeMapping m = getMapping(BigInteger.class, date);
        ScalarExpression integerLiteral = m.newLiteral(date.getQueryExpression(), BigInteger.ONE);
        NumericExpression expr = new NumericExpression(new NumericExpression("TO_NUMBER", args1), ScalarExpression.OP_SUB, integerLiteral);
View Full Code Here

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

        ArrayList args = new ArrayList();
        args.add(date);
        args.add(getMapping(String.class, date).newLiteral(date.getQueryExpression(), "YYYY"));

        ArrayList args1 = new ArrayList();
        args1.add(new StringExpression("TO_CHAR", args));

        return new NumericExpression("TO_NUMBER", args1);
    }
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.