Examples of Collection


Examples of java.util.Collection

   
    void helpTest(String sql, String expected) throws Exception{
        FakeMetadataFacade metadata = TestXMLProcessor.exampleMetadataCached();
        Query query = (Query)TestXMLProcessor.helpGetCommand(sql, metadata);

        Collection groups = GroupCollectorVisitor.getGroups(query, true);
        GroupSymbol group = (GroupSymbol) groups.iterator().next();
       
        MappingDocument docOrig = (MappingDocument)metadata.getMappingNode(metadata.getGroupID(group.getName()));
        MappingDocument doc = (MappingDocument)docOrig.clone();
       
        doc = XMLPlanner.preMarkExcluded(query, doc);      
View Full Code Here

Examples of java.util.Collection

  }
 
  public void helpTestReplacer(String critString, String expectedCrit, int numContexts) throws QueryParserException {
        Criteria crit = QueryParser.getQueryParser().parseCriteria(critString);
       
    Collection contexts = ContextReplacerVisitor.replaceContextFunctions(crit);
    assertTrue("Actual crit " +  crit + " didn't meet expected crit " + expectedCrit, expectedCrit.equalsIgnoreCase(crit.toString())); //$NON-NLS-1$ //$NON-NLS-2$
        assertTrue("Should've gotten " + numContexts + " but got " + contexts.size(), contexts.size() == numContexts); //$NON-NLS-1$ //$NON-NLS-2$
  }
View Full Code Here

Examples of java.util.Collection

    private static void prepareFrame(PlanNode frame) {
        // find the new root of the frame so that access patterns can be propagated
        PlanNode newRoot = FrameUtil.findJoinSourceNode(frame.getFirstChild());
        if (newRoot != null) {
            Collection ap = (Collection)frame.getProperty(NodeConstants.Info.ACCESS_PATTERNS);
            if (ap != null) {
                Collection newAp = (Collection)newRoot.getProperty(NodeConstants.Info.ACCESS_PATTERNS);
                if (newAp == null) {
                    newRoot.setProperty(NodeConstants.Info.ACCESS_PATTERNS, ap);
                } else {
                    newAp.addAll(ap);
                }
            }
            RulePlaceAccess.copyDependentHints(frame, newRoot);
        }
    }
View Full Code Here

Examples of java.util.Collection

        }

        List<ElementSymbol> virtualElements = symbolMap.getKeys();
        for (int i = 0; i < selectSymbols.size(); i++) {
          SingleElementSymbol symbol = selectSymbols.get(i);
            Collection scalarSubqueries = ValueIteratorProviderCollectorVisitor.getValueIteratorProviders(symbol);
            if (!scalarSubqueries.isEmpty()) {
                return false;
            }
            if (checkForNullDependent && JoinUtil.isNullDependent(metadata, groups, SymbolMap.getExpression(symbol))) {
                return false;
            }
View Full Code Here

Examples of java.util.Collection

        n1.setProperty(NodeConstants.Info.ATOMIC_REQUEST, query);
        n1.addGroup(group);
       
        RulePlaceAccess.addAccessPatternsProperty(n1, METADATA);

        Collection accessPatterns = (Collection)n1.getProperty(NodeConstants.Info.ACCESS_PATTERNS);
        assertNotNull(accessPatterns);
        assertTrue("Expected two access patterns, got " + accessPatterns.size(), accessPatterns.size() == 2); //$NON-NLS-1$
    }  
View Full Code Here

Examples of java.util.Collection

   
    XMLPlannerEnvironment getEnv(String sql) throws Exception{
        FakeMetadataFacade metadata = TestXMLProcessor.exampleMetadataCached();
        Query query = (Query)TestXMLProcessor.helpGetCommand(sql, metadata);

        Collection groups = GroupCollectorVisitor.getGroups(query, true);
        GroupSymbol group = (GroupSymbol) groups.iterator().next();
       
        MappingDocument docOrig = (MappingDocument)metadata.getMappingNode(metadata.getGroupID(group.getName()));
        MappingDocument doc = (MappingDocument)docOrig.clone();

        XMLPlannerEnvironment env = new XMLPlannerEnvironment(metadata);
View Full Code Here

Examples of java.util.Collection

    }

  public static boolean matchesForeignKey(QueryMetadataInterface metadata,
      Collection<Object> leftIds, Collection<Object> rightIds, GroupSymbol leftGroup, boolean exact)
      throws TeiidComponentException, QueryMetadataException {
    Collection fks = metadata.getForeignKeysInGroup(leftGroup.getMetadataID());
    for (Object fk : fks) {
      List fkColumns = metadata.getElementIDsInKey(fk);
      if ((exact && leftIds.size() != fkColumns.size()) || !leftIds.containsAll(fkColumns)) {
        continue;
      }
View Full Code Here

Examples of java.util.Collection

      out.write("<h1>Groups");
      out.write("</h1>\r\n");
      out.write("<hr>\r\n");
      out.write("<ol>\r\n");

  Collection groups = um.getGroups();
  for (Iterator iterator = groups.iterator(); iterator.hasNext();)
  {
    Group group = (Group) iterator.next();
          out.write("\r\n\t\t");
      out.write("<li>");
      out.print( group.getName() );
View Full Code Here

Examples of java.util.Collection

      Expression copy = null;
      if(getExpression() != null) {
          copy = (Expression) getExpression().clone();
     
     
      Collection copyValues = null;
      if (isAllConstants()) {
        copyValues = new LinkedHashSet(values);
      } else {
        copyValues = LanguageObject.Util.deepClone(new ArrayList(values), Expression.class);
      }
View Full Code Here

Examples of java.util.Collection

        }

        Collection<ProxyService> proxyServices = synapseConfig.getProxyServices();
        Collection<SynapseEventSource> eventSources = synapseConfig.getEventSources();
        Collection<Startup> tasks = synapseConfig.getStartups();
        Collection localEntries = synapseConfig.getLocalRegistry().values();
        Collection<PriorityExecutor> executors = synapseConfig.getPriorityExecutors().values();
        Collection<MessageStore> messageStores = synapseConfig.getMessageStores().values();
        Collection<MessageProcessor> messageProcessors =
                synapseConfig.getMessageProcessors().values();
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.