Examples of IntegerLiteral


Examples of org.datanucleus.store.rdbms.sql.expression.IntegerLiteral

            }
            else if (expr instanceof IntegerLiteral)
            {
                int originalValue = ((Number) ((IntegerLiteral) expr).getValue()).intValue();
                Integer absValue = Integer.valueOf(Math.abs(originalValue));
                return new IntegerLiteral(stmt, expr.getJavaTypeMapping(), absValue, null);
            }
            else if (expr instanceof FloatingPointLiteral)
            {
                double originalValue = ((BigDecimal) ((FloatingPointLiteral) expr).getValue()).doubleValue();
                Double absValue = new Double(Math.abs(originalValue));
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.IntegerLiteral

    {
        if (expr instanceof StringLiteral)
        {
            JavaTypeMapping m = exprFactory.getMappingForType(int.class, false);
            String val = (String)((StringLiteral)expr).getValue();
            return new IntegerLiteral(stmt, m, Integer.valueOf(val.length()), null);
        }
        else if (expr instanceof StringExpression || expr instanceof ParameterLiteral)
        {
            ArrayList funcArgs = new ArrayList();
            funcArgs.add(expr);
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.IntegerLiteral

    public SQLExpression getExpression(SQLExpression expr, List args)
    {
        if (expr instanceof EnumLiteral)
        {
            Enum val = (Enum)((EnumLiteral)expr).getValue();
            return new IntegerLiteral(stmt,
                exprFactory.getMappingForType(int.class, false), val.ordinal(), null);
        }
        else if (expr instanceof EnumExpression)
        {
            EnumExpression enumExpr = (EnumExpression)expr;
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.IntegerLiteral

    {
        if (expr instanceof StringLiteral)
        {
            JavaTypeMapping m = exprFactory.getMappingForType(int.class, false);
            String val = (String)((StringLiteral)expr).getValue();
            return new IntegerLiteral(stmt, m, Integer.valueOf(val.length()), null);
        }
        else if (expr instanceof StringExpression || expr instanceof ParameterLiteral)
        {
            ArrayList funcArgs = new ArrayList();
            funcArgs.add(expr);
View Full Code Here

Examples of org.eclipse.assemblyformatter.ir.lowlevel.IntegerLiteral

      }
      break;
    default:
      if (Character.isDigit(character)) {
        // INT BRANCH
        section = new IntegerLiteral();
        section.setOffset(position);
        boolean flag = true;
        while (flag) {
          moveForward();
          if (moveSuccess) {
View Full Code Here

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

    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        if (datastoreJavaType.equals(ClassNameConstants.JAVA_LANG_INTEGER))
        {
            // Return an IntegerLiteral to represent this Enum, but with the original value present just in case
            ScalarExpression expr = new IntegerLiteral(qs, this, BigInteger.valueOf(((Enum)value).ordinal()));
            ((Literal)expr).setRawValue(value);
            return expr;
        }
        else if (datastoreJavaType.equals(ClassNameConstants.JAVA_LANG_STRING))
        {
View Full Code Here

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

        return mappingSampleValue;
    }

    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        ScalarExpression expr = new IntegerLiteral(qs, this, (Number)value);
        return expr;
    }
View Full Code Here

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

        return mappingSampleValue;
    }

    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        ScalarExpression expr = new IntegerLiteral(qs, this, (Number)value);
        return expr;
    }
View Full Code Here

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

     * @param value The value of the literal
     * @return The Literal
     */
    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        return new IntegerLiteral(qs, this, objectToNumber(value));
    }
View Full Code Here

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

     * @param value The value of the object
     * @return The new literal
     */
    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        return new IntegerLiteral(qs, this, (Number)value);
    }
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.