Examples of PrimaryExpression


Examples of org.datanucleus.query.expression.PrimaryExpression

  private void handleContainsOperation(InvokeExpression invocation, Expression expr, QueryData qd) {
    Expression param = (Expression) invocation.getArguments().get(0);
    param.bind();
    if (expr.getLeft() instanceof PrimaryExpression) {
      PrimaryExpression left = (PrimaryExpression) expr.getLeft();
      // treat contains as equality since that's how the low-level
      // api does checks on multi-value properties.

      // TODO(maxr): Validate that the lhs of contains
      // is a Collection of some sort.
View Full Code Here

Examples of org.datanucleus.query.expression.PrimaryExpression

    return getMetaDataManager().getMetaDataForClass(sym.getValueType(), getClassLoaderResolver());
  }

  private OrderExpression createJoinOrderExpression(PrimaryExpression expression) {
    SymbolTable symTable = getSymbolTable();
    PrimaryExpression primaryOrderExpr = new PrimaryExpression(symTable, expression.getTuples());
    return new OrderExpression(symTable, primaryOrderExpr);
  }
View Full Code Here

Examples of org.datanucleus.query.expression.PrimaryExpression

        String method = expr.getOperation();
        Object param = expr.getArguments().get(0);
        Object paramValue = null;
        if (param instanceof PrimaryExpression)
        {
            PrimaryExpression primExpr = (PrimaryExpression)param;
            paramValue = eval.getValueForPrimaryExpression(primExpr);
        }
        else if (param instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param;
View Full Code Here

Examples of org.datanucleus.query.expression.PrimaryExpression

        String method = expr.getOperation();
        Object param1 = expr.getArguments().get(0);
        int param1Value = -1;
        if (param1 instanceof PrimaryExpression)
        {
            PrimaryExpression primExpr = (PrimaryExpression)param1;
            Object val = eval.getValueForPrimaryExpression(primExpr);
            if (val instanceof Number)
            {
                param1Value = ((Number)val).intValue();
            }
            else
            {
                throw new NucleusException(method + "(num1, num2) where num1 is instanceof " + param1.getClass().getName() + " but should be integer");
            }
        }
        else if (param1 instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param1;
            Object val = QueryUtils.getValueForParameterExpression(eval.getParameterValues(), paramExpr);
            if (val instanceof Number)
            {
                param1Value = ((Number)val).intValue();
            }
            else
            {
                throw new NucleusException(method + "(num1, num2) where num1 is instanceof " + param1.getClass().getName() + " but should be integer");
            }
        }
        else if (param1 instanceof Literal)
        {
            Object val = ((Literal)param1).getLiteral();
            if (val instanceof Number)
            {
                param1Value = ((Number)val).intValue();
            }
            else
            {
                throw new NucleusException(method + "(num1, num2) where num1 is instanceof " + param1.getClass().getName() + " but should be integer");
            }
        }
        else
        {
            throw new NucleusException(method + "(num1, num2) where num1 is instanceof " + param1.getClass().getName() + " not supported");
        }

        Object param2 = expr.getArguments().get(1);
        int param2Value = -1;
        if (param2 instanceof PrimaryExpression)
        {
            PrimaryExpression primExpr = (PrimaryExpression)param2;
            Object val = eval.getValueForPrimaryExpression(primExpr);
            if (val instanceof Number)
            {
                param2Value = ((Number)val).intValue();
            }
View Full Code Here

Examples of org.datanucleus.query.expression.PrimaryExpression

        String method = expr.getOperation();
        Object param = expr.getArguments().get(0);
        Object paramValue = null;
        if (param instanceof PrimaryExpression)
        {
            PrimaryExpression primExpr = (PrimaryExpression)param;
            paramValue = eval.getValueForPrimaryExpression(primExpr);
        }
        else if (param instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param;
View Full Code Here

Examples of org.datanucleus.query.expression.PrimaryExpression

        String method = expr.getOperation();
        Object param = expr.getArguments().get(0);
        Object paramValue = null;
        if (param instanceof PrimaryExpression)
        {
            PrimaryExpression primExpr = (PrimaryExpression)param;
            paramValue = eval.getValueForPrimaryExpression(primExpr);
        }
        else if (param instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param;
View Full Code Here

Examples of org.datanucleus.query.expression.PrimaryExpression

        String arg1 = null;
        Object arg1Obj = null;
        Object param = expr.getArguments().get(0);
        if (param instanceof PrimaryExpression)
        {
            PrimaryExpression primExpr = (PrimaryExpression)param;
            arg1Obj = eval.getValueForPrimaryExpression(primExpr);
        }
        else if (param instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param;
View Full Code Here

Examples of org.xvr.s3D.primaryExpression

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetLExpr(primaryExpression newLExpr, NotificationChain msgs)
  {
    primaryExpression oldLExpr = lExpr;
    lExpr = newLExpr;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, S3DPackage.REL_EXPRESSION__LEXPR, oldLExpr, newLExpr);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of org.xvr.s3D.primaryExpression

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetRExpr(primaryExpression newRExpr, NotificationChain msgs)
  {
    primaryExpression oldRExpr = rExpr;
    rExpr = newRExpr;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, S3DPackage.REL_EXPRESSION__REXPR, oldRExpr, newRExpr);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of org.xvr.s3D.primaryExpression

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetCond(primaryExpression newCond, NotificationChain msgs)
  {
    primaryExpression oldCond = cond;
    cond = newCond;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, S3DPackage.CASE_STATEMENT__COND, oldCond, newCond);
      if (msgs == null) msgs = notification; else msgs.add(notification);
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.