Package org.eclipse.persistence.internal.expressions

Examples of org.eclipse.persistence.internal.expressions.ConstantExpression


            ReportItem item = (ReportItem)i.next();
            Expression expr = item.getAttributeExpression();
            reportQuery.addNonFetchJoinedAttribute(expr);
        }
        reportQuery.clearItems();
        Expression one = new ConstantExpression(Integer.valueOf(1), new ExpressionBuilder());
        reportQuery.addItem("one", one);
        reportQuery.dontUseDistinct();
        Expression expr = context.getBaseExpression();
        return notIndicated() ? expr.notExists(reportQuery) :
            expr.exists(reportQuery);
View Full Code Here


                    }
                }
            }
        } else {
            if (expression==argument){
                foreignKeyJoin = (new ConstantExpression(0, base)).equal(new ConstantExpression(0, base));
            }else{
                int size = this.mechanism.sourceKeyFields.size();
                Expression relTable = base.getTable(this.mechanism.getRelationTable());
                for(int i=0; i < size; i++) {
                    Expression source = base.getField(this.mechanism.sourceKeyFields.get(i));
View Full Code Here

    /**
     * INTERNAL
     * Generate the expression.
     */
    public Expression generateExpression(GenerationContext context) {
        Expression whereClause = new ConstantExpression(Integer.valueOf(0), new ExpressionBuilder());
        whereClause = ExpressionMath.subtract(whereClause, getLeft().generateExpression(context));
        return whereClause;
    }
View Full Code Here

    // First create the Expression that is prepended with the unary sign
    expression.getExpression().accept(this);
    Expression arithmeticFactor = queryExpression;

    // Create an expression for the constant 0 (zero)
    queryExpression = new ConstantExpression(0, new ExpressionBuilder());

    // "- <something>" is really "0 - <something>"
    queryExpression = ExpressionMath.subtract(queryExpression, arithmeticFactor);

    // Note: The type will be calculated when traversing the sub-expression
View Full Code Here

   */
  @Override
  public void visit(EntityTypeLiteral expression) {
    ClassDescriptor descriptor = queryContext.getDescriptor(expression.getEntityTypeName());
    type[0] = descriptor.getJavaClass();
    queryExpression = new ConstantExpression(type[0], queryContext.getBaseExpression());
  }
View Full Code Here

      subquery.addNonFetchJoinedAttribute(expr);
    }

    subquery.clearItems();

    Expression one = new ConstantExpression(1, new ExpressionBuilder());
    subquery.addItem("one", one);
    subquery.dontUseDistinct();

    // Now create the EXISTS expression
    queryExpression = queryContext.getBaseExpression();
View Full Code Here

      value   = Boolean.FALSE;
      type[0] = Boolean.class;
    }

    queryExpression = queryContext.getBaseExpression();
    queryExpression = new ConstantExpression(value, queryExpression);
  }
View Full Code Here

    }

    Number number = queryContext.newInstance(type[0], String.class, text);

    // Now create the numeric expression
    queryExpression = new ConstantExpression(number, queryContext.getBaseExpression());
  }
View Full Code Here

  @Override
  public void visit(StringLiteral expression) {

    // Create the expression
    queryExpression = queryContext.getBaseExpression();
    queryExpression = new ConstantExpression(expression.getUnquotedText(), queryExpression);

    // Set the expression type
    type[0] = String.class;
  }
View Full Code Here

        ClassDescriptor descriptor = queryContext.getDescriptor(expression.getText());

        // Entity type name
        if (descriptor != null) {
          type[0] = descriptor.getJavaClass();
          queryExpression = new ConstantExpression(type[0], queryContext.getBaseExpression());
          found = true;
        }
      }

      if (!found) {
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.expressions.ConstantExpression

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.