Examples of PathAnalysis


Examples of ch.epfl.labos.iu.orm.queryll2.path.PathAnalysis

   {
      SymbExToColumns translator = config.newSymbExToColumns(SelectFromWhereLambdaArgumentHandler.fromSelectFromWhere(sfw, where, config.metamodel, parentArgumentScope, withSource));
      Expression methodExpr = null;
      for (int n = 0; n < where.symbolicAnalysis.paths.size(); n++)
      {
         PathAnalysis path = where.symbolicAnalysis.paths.get(n);

         TypedValue returnVal = PathAnalysisSimplifier
               .simplifyBoolean(path.getReturnValue(), config.getComparisonMethods());
         SymbExPassDown returnPassdown = SymbExPassDown.with(null, true);
         ColumnExpressions<?> returnColumns = returnVal.visit(translator, returnPassdown);
         if (!returnColumns.isSingleColumn())
            throw new QueryTransformException("Expecting single column");
         Expression returnExpr = returnColumns.getOnlyColumn();
View Full Code Here

Examples of ch.epfl.labos.iu.orm.queryll2.path.PathAnalysis

            SymbExToColumns translator = new SymbExToColumns(metamodel,
                  new SelectFromWhereLambdaArgumentHandler(where, fromList));
            Condition methodExpr = null;
            for (int n = 0; n < where.symbolicAnalysis.paths.size(); n++)
            {
               PathAnalysis path = where.symbolicAnalysis.paths.get(n);

               TypedValue returnVal = PathAnalysisSimplifier.simplifyBoolean(path.getReturnValue(), Collections.emptyMap());
               ColumnExpressions<?> returnColumns = translator.transform(returnVal);
               if (!returnColumns.isSingleColumn()) throw new IllegalArgumentException("Where lambda should only return a single column of data");
               QueryPart returnExpr = returnColumns.getOnlyColumn();

               if (returnVal instanceof ConstantValue.BooleanConstant)
               {
                  if (((ConstantValue.BooleanConstant)returnVal).val)
                  {
                     // This path returns true, so it's redundant to actually
                     // put true into the final code.
                     returnExpr = null;
                  }
                  else
                  {
                     // This path returns false, so we can ignore it
                     continue;
                  }
               }
              
               // Handle where path conditions
               Condition conditionExpr = null;
               for (TypedValue cmp: path.getConditions())
               {
                  ColumnExpressions<?> col = translator.transform(cmp);
                  if (!col.isSingleColumn()) throw new IllegalArgumentException("Expecting a single column");
                  Condition expr = (Condition)col.getOnlyColumn();
                  if (conditionExpr != null)
View Full Code Here

Examples of com.netflix.exhibitor.core.entities.PathAnalysis

                    return new IdList(Lists.newArrayList(s));
                }
            }
        );
        String              error = analysis.getError();
        PathAnalysis        response;
        try
        {
            response = new PathAnalysis((error != null) ? error : "", Lists.newArrayList(transformed), Lists.newArrayList(transformedPossibleCycles));
        }
        catch ( Exception e )
        {
            context.getExhibitor().getLog().add(ActivityLog.Type.ERROR, "Error performing analysis", e);
            throw e;
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.