Examples of TypedValueVisitorException


Examples of ch.epfl.labos.iu.orm.queryll2.symbolic.TypedValueVisitorException

   // These are only valid if there is only one column (is this correct?)
   public SQLColumnValues<T> add(String str) throws TypedValueVisitorException
   {
      if (columns.length != 1)
         throw new TypedValueVisitorException("Adding string to multi-column value");
      columns[0].add(str);
      return this;
   }
View Full Code Here

Examples of ch.epfl.labos.iu.orm.queryll2.symbolic.TypedValueVisitorException

      return this;
   }
   public SQLColumnValues<T> add(SQLColumnValues toAdd) throws TypedValueVisitorException
   {
      if (columns.length != 1)
         throw new TypedValueVisitorException("Adding to a multi-column value");
      if (columns.length != toAdd.columns.length)
         throw new TypedValueVisitorException("Adding together different number of columns");
      columns[0].add(toAdd.columns[0]);
      return this;
   }
View Full Code Here

Examples of ch.epfl.labos.iu.orm.queryll2.symbolic.TypedValueVisitorException

      this.parentArgumentScope = parentArgumentScope;
   }

   protected ColumnExpressions<?> handleLambdaArg(int argIndex, Type argType) throws TypedValueVisitorException
   {
      throw new TypedValueVisitorException("Unhandled lambda arguments");
   }
View Full Code Here

Examples of ch.epfl.labos.iu.orm.queryll2.symbolic.TypedValueVisitorException

      if (paramVal instanceof TypedValue.ArgValue)
      {
         TypedValue.ArgValue paramArg = (TypedValue.ArgValue)paramVal;
         int parentArgIndex = paramArg.getIndex();
         if (parentArgumentScope == null)
            throw new TypedValueVisitorException("Cannot find a parent scope to determine how to access as sublambda's parent parameters.");
         // TODO: Right now, we need to be careful about the scope of parent lambdas. Since we only support
         // limited usage of parameters for sublambdas, it's not a problem yet, but more complicated usages
         // might be problematic. (Might have to pass additional parameteres to handleArg etc.)
         return parentArgumentScope.handleArg(parentArgIndex, argType);
      }
      else
      {
         throw new TypedValueVisitorException("Jinq can only passthrough parent lambda parameters directly to sub-lambdas. Sublambdas cannot take parameters that involve computation.");
      }
   }
View Full Code Here

Examples of ch.epfl.labos.iu.orm.queryll2.symbolic.TypedValueVisitorException

      // fields/methods of those entities to be called in the query (code
      // motion will be used to push those field accesses or method calls
      // outside the query where they will be evaluated and then passed in
      // as a parameter)
      if (!ALLOWED_QUERY_PARAMETER_TYPES.contains(argType) && !metamodel.isKnownEnumType(argType.getInternalName()))
         throw new TypedValueVisitorException("Accessing a field with unhandled type");

      return ColumnExpressions.singleColumn(new SimpleRowReader<>(),
            new ParameterExpression(lambda.getLambdaIndex(), argIndex));
   }
View Full Code Here

Examples of ch.epfl.labos.iu.orm.queryll2.symbolic.TypedValueVisitorException

   public ColumnExpressions<?> handleArg(int argIndex, Type argType) throws TypedValueVisitorException
   {
      if (argIndex < numLambdaCapturedArgs)
      {
         if (lambda == null)
            throw new TypedValueVisitorException("No lambda source was supplied where parameters can be extracted");
         if (lambda.usesIndirectArgs())
         {
            return handleIndirectLambdaArg(argIndex, argType);
         }
        
         return getAndValidateArg(argIndex, argType);
      }
      else if (checkIsInQueryStreamSource(argIndex))
         throw new TypedValueVisitorException("Using InQueryStreamSource as data");
      else
         return handleLambdaArg(argIndex - numLambdaCapturedArgs, argType);
   }
View Full Code Here

Examples of ch.epfl.labos.iu.orm.queryll2.symbolic.TypedValueVisitorException

         return handleLambdaArg(argIndex - numLambdaCapturedArgs, argType);
   }

   protected JPQLQuery<?> handleLambdaSubQueryArg(int argIndex, Type argType) throws TypedValueVisitorException
   {
      throw new TypedValueVisitorException("Unhandled lambda subquery arguments");
   }
View Full Code Here

Examples of ch.epfl.labos.iu.orm.queryll2.symbolic.TypedValueVisitorException

   {
      if (argIndex >= numLambdaCapturedArgs && !checkIsInQueryStreamSource(argIndex))
      {
         return handleLambdaSubQueryArg(argIndex - numLambdaCapturedArgs, argType);
      }
      throw new TypedValueVisitorException("Cannot use parameters as a subquery");
   }
View Full Code Here

Examples of ch.epfl.labos.iu.orm.queryll2.symbolic.TypedValueVisitorException

      if (paramVal instanceof TypedValue.ArgValue)
      {
         TypedValue.ArgValue paramArg = (TypedValue.ArgValue)paramVal;
         int parentArgIndex = paramArg.getIndex();
         if (parentArgumentScope == null)
            throw new TypedValueVisitorException("Cannot find a parent scope to determine how to access as sublambda's parent parameters.");
         // TODO: Right now, we need to be careful about the scope of parent lambdas. Since we only support
         // limited usage of parameters for sublambdas, it's not a problem yet, but more complicated usages
         // might be problematic. (Might have to pass additional parameteres to handleArg etc.)
         return parentArgumentScope.handleArg(parentArgIndex, argType);
      }
      else if (paramVal instanceof TypedValue.GetFieldValue)
      {
         TypedValue.GetFieldValue paramArg = (TypedValue.GetFieldValue)paramVal;
         String parentFieldName = paramArg.name;
         if (parentArgumentScope == null)
            throw new TypedValueVisitorException("Cannot find a parent scope to determine how to access as sublambda's parent parameters.");
         // TODO: Right now, we need to be careful about the scope of parent lambdas. Since we only support
         // limited usage of parameters for sublambdas, it's not a problem yet, but more complicated usages
         // might be problematic. (Might have to pass additional parameteres to handleArg etc.)
         return parentArgumentScope.handleThisFieldRead(parentFieldName, argType);
      }
      else
      {
         throw new TypedValueVisitorException("Jinq can only passthrough parent lambda parameters directly to sub-lambdas. Sublambdas cannot take parameters that involve computation.");
      }
   }
View Full Code Here

Examples of ch.epfl.labos.iu.orm.queryll2.symbolic.TypedValueVisitorException

         // fields/methods of those entities to be called in the query (code
         // motion will be used to push those field accesses or method calls
         // outside the query where they will be evaluated and then passed in
         // as a parameter)
         if (!ALLOWED_QUERY_PARAMETER_TYPES.contains(argType) && !metamodel.isKnownEnumType(argType.getInternalName()))
            throw new TypedValueVisitorException("Accessing a field with unhandled type");

         return ColumnExpressions.singleColumn(new SimpleRowReader<>(),
               new ParameterFieldExpression(lambda.getLambdaIndex(), name));
      }
      throw new TypedValueVisitorException("Cannot read fields of this lambda");
   }
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.