Examples of CommandContext


Examples of org.teiid.query.util.CommandContext

        elements.add(elementSymbol_2);
        node.setIntoElements(elements);
        node.setMode(mode);
        node.setModelName("myModel"); //$NON-NLS-1$
       
        CommandContext context = new CommandContext();
        context.setProcessorID("processorID"); //$NON-NLS-1$
        BufferManager bm = NodeTestUtil.getTestBufferManager(tupleBatchSize, tupleBatchSize);
        ProcessorDataManager dataManager = new FakePDM(tupleBatchSize);
       
        child.initialize(context, bm, dataManager);
        node.initialize(context, bm, dataManager);
View Full Code Here

Examples of org.teiid.query.util.CommandContext

      };
    dataManager = new TempTableDataManager(hdm, bm, executor, cache, cache, new DefaultCacheFactory());
  }
 
  private void execute(String sql, List<?>... expectedResults) throws Exception {
    CommandContext cc = TestProcessor.createCommandContext();
    cc.setTempTableStore(tempStore);
    cc.setGlobalTableStore(globalStore);
    cc.setMetadata(metadata);
    CapabilitiesFinder finder = new DefaultCapabilitiesFinder();
    previousPlan = TestProcessor.helpGetPlan(TestProcessor.helpParse(sql), metadata, finder, cc);
    cc.setQueryProcessorFactory(new QueryProcessorFactoryImpl(BufferManagerFactory.getStandaloneBufferManager(), dataManager, finder, null, metadata));
    TestProcessor.doProcess(previousPlan, dataManager, expectedResults, cc);
  }
View Full Code Here

Examples of org.teiid.query.util.CommandContext

        CacheID id = new CacheID(session, pi, dummy.toString());

        PreparedPlan pPlan = new PreparedPlan();
        cache.put(id, Determinism.SESSION_DETERMINISTIC, pPlan, null);
        pPlan.setCommand(dummy);
        pPlan.setPlan(new RelationalPlan(new ProjectNode(i)), new CommandContext());
            AnalysisRecord analysisRecord = new AnalysisRecord(true, false);
        pPlan.setAnalysisRecord(analysisRecord);
        ArrayList<Reference> refs = new ArrayList<Reference>();
        refs.add(new Reference(1));
        pPlan.setReferences(refs);
View Full Code Here

Examples of org.teiid.query.util.CommandContext

       
        if (report.hasItems()) {
            ValidatorFailure firstFailure = report.getItems().iterator().next();
            throw new QueryValidatorException(firstFailure.getMessage());
        }
        QueryRewriter.rewrite(userCommand, metadata, new CommandContext());

        AnalysisRecord analysisRecord = new AnalysisRecord(false, DEBUG);
        try {
          if ( capabilitiesFinder == null ) capabilitiesFinder = new DefaultCapabilitiesFinder();
          ProcessorPlan plan = QueryOptimizer.optimizePlan(userCommand, metadata, null, capabilitiesFinder, analysisRecord, null);
View Full Code Here

Examples of org.teiid.query.util.CommandContext

            }
        }
    }
   
    public static void helpTestProcess(ProcessorPlan procPlan, List[] expectedResults, ProcessorDataManager dataMgr, QueryMetadataInterface metadata) throws Exception {
        CommandContext context = new CommandContext("pID", null, null, null, 1); //$NON-NLS-1$
        if (!(metadata instanceof TempMetadataAdapter)) {
          metadata = new TempMetadataAdapter(metadata, new TempMetadataStore());
        }
        context.setMetadata(metadata);         
       
      TestProcessor.helpProcess(procPlan, context, dataMgr, expectedResults);
      assertNotNull("Expected processing to fail", expectedResults);
    }
View Full Code Here

Examples of se.sics.mspsim.cli.CommandContext

      public void lineRead(String line) {
        addCLIData(line);
      }
    };
    PrintStream po = new PrintStream(new LineOutputStream(lineListener));
    final CommandContext commandContext = new CommandContext(mspMote.getCLICommandHandler(), null, "", new String[0], 1, null);
    commandContext.out = po;
    commandContext.err = po;

    JPopupMenu popupMenu = new JPopupMenu();
    JMenuItem clearItem = new JMenuItem("Clear");
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.