Examples of asMap()


Examples of org.springframework.validation.support.BindingAwareModelMap.asMap()

        String view = controller.showAddTodoForm(model);

        verifyZeroInteractions(messageSourceMock, serviceMock);
        assertEquals(TodoController.VIEW_TODO_ADD, view);

        TodoDTO formObject = (TodoDTO) model.asMap().get(TodoController.MODEL_ATTRIBUTE_TODO);

        assertNull(formObject.getId());
        assertNull(formObject.getDescription());
        assertNull(formObject.getTitle());
    }
View Full Code Here

Examples of org.springframework.webflow.core.collection.ParameterMap.asMap()

      logger.debug("Binding to model");
    }
    DefaultMapper mapper = new DefaultMapper();
    ParameterMap requestParameters = requestContext.getRequestParameters();
    if (binderConfiguration != null) {
      addModelBindings(mapper, requestParameters.asMap().keySet(), model);
    } else {
      addDefaultMappings(mapper, requestParameters.asMap().keySet(), model);
    }
    return mapper.map(requestParameters, model);
  }
View Full Code Here

Examples of org.teiid.query.sql.util.SymbolMap.asMap()

        PlanNode parent = NodeEditor.findParent(unionSource, NodeConstants.Types.SOURCE);
        SymbolMap parentMap = (SymbolMap) parent.getProperty(NodeConstants.Info.SYMBOL_MAP);
        SymbolMap viewMapping = SymbolMap.createSymbolMap(parentMap.getKeys(), projectedViewSymbols);
        for (AggregateSymbol agg : aggregates) {
          agg = (AggregateSymbol)agg.clone();
          ExpressionMappingVisitor.mapExpressions(agg, viewMapping.asMap());
          if (pushdown) {
            projectedViewSymbols.add(agg);
          } else {
            if (agg.getAggregateFunction() == Type.COUNT) {
              if (agg.getExpression() == null) {
View Full Code Here

Examples of org.teiid.query.sql.util.SymbolMap.asMap()

        return null;
      }
        // Check whether source supports correlated subqueries and if not, whether criteria has them
        SymbolMap refs = subqueryContainer.getCommand().getCorrelatedReferences();
        try {
            if(refs != null && !refs.asMap().isEmpty()) {
                if(! CapabilitiesUtil.supports(Capability.QUERY_SUBQUERIES_CORRELATED, critNodeModelID, metadata, capFinder)) {
                    return null;
                }
                //TODO: this check sees as correlated references as coming from the containing scope
                //but this is only an issue with deeply nested subqueries
View Full Code Here

Examples of org.teiid.query.sql.util.SymbolMap.asMap()

        }

        // Otherwise merge should work

        // Convert parent frame before merge
        FrameUtil.convertFrame(frame, virtualGroup, FrameUtil.findJoinSourceNode(projectNode).getGroups(), symbolMap.asMap(), metadata);

        PlanNode parentBottom = frame.getParent();
        prepareFrame(frame);

        // Remove top 2 nodes (SOURCE, PROJECT) of virtual group - they're no longer needed
View Full Code Here

Examples of org.teiid.query.sql.util.SymbolMap.asMap()

        SymbolMap symbolMap = (SymbolMap)sourceNode.getProperty(NodeConstants.Info.SYMBOL_MAP);
        for (Iterator i = accessPatterns.iterator(); i.hasNext();) {
            AccessPattern ap = (AccessPattern)i.next();
            for (Iterator elems = ap.getUnsatisfied().iterator(); elems.hasNext();) {
                ElementSymbol symbol = (ElementSymbol)elems.next();
                Expression mapped = convertExpression(symbol, symbolMap.asMap());
                if (ElementCollectorVisitor.getElements(mapped, true).isEmpty()) {
                    return false;
                }
            }
        }
View Full Code Here

Examples of org.teiid.query.sql.util.SymbolMap.asMap()

      projectNode1.addGroup(four);
      projectNode1.setProperty(Info.PROJECT_COLS, Arrays.asList(e2));
     
      //removing source node 3 completely
      SymbolMap replacement = SymbolMap.createSymbolMap(Arrays.asList(e1), Arrays.asList(new Constant(null)));
      FrameUtil.convertFrame(NodeEditor.findNodePreOrder(joinNode, NodeConstants.Types.SOURCE), getGroup(3), null, replacement.asMap(), null);
      assertEquals(2, joinNode.getGroups().size()); //even though this is a cross join it should still retain its groups
      assertEquals(0, NodeEditor.findNodePreOrder(joinNode, NodeConstants.Types.SELECT).getGroups().size());
      assertEquals(1, projectNode1.getGroups().size());
      assertEquals(0, projectNode.getGroups().size());
    }
View Full Code Here

Examples of org.teiid.query.sql.util.SymbolMap.asMap()

      projectNode1.addGroup(four);
      projectNode1.setProperty(Info.PROJECT_COLS, Arrays.asList(e2));
     
      //replace source 3 with groups 5, 6
      SymbolMap replacement = SymbolMap.createSymbolMap(Arrays.asList(e1), Arrays.asList(new Constant(null)));
      FrameUtil.convertFrame(NodeEditor.findNodePreOrder(joinNode, NodeConstants.Types.SOURCE), getGroup(3), new HashSet<GroupSymbol>(Arrays.asList(getGroup(5), getGroup(6))), replacement.asMap(), null);
      assertEquals(4, joinNode.getGroups().size()); //even though this is a cross join it should still retain its groups
      assertEquals(0, NodeEditor.findNodePreOrder(joinNode, NodeConstants.Types.SELECT).getGroups().size());
      assertEquals(1, projectNode1.getGroups().size());
      assertEquals(0, projectNode.getGroups().size());
    }
View Full Code Here

Examples of org.teiid.query.sql.util.SymbolMap.asMap()

    query.setOrderBy(null);
    SymbolMap expressionMapping = SymbolMap.createSymbolMap(update.getGroup(), query.getProjectedSymbols(), metadata);
   
    ArrayList<SingleElementSymbol> selectSymbols = mapChangeList(update, symbolMap);
    query.setSelect(new Select(selectSymbols));
    ExpressionMappingVisitor emv = new ExpressionMappingVisitor(expressionMapping.asMap(), true);
    PostOrderNavigator.doVisit(query.getSelect(), emv);
   
    Criteria crit = update.getCriteria();
    if (crit != null) {
      PostOrderNavigator.doVisit(crit, emv);
View Full Code Here

Examples of org.teiid.query.sql.util.SymbolMap.asMap()

    Query query = (Query)info.getViewDefinition().clone();
    query.setOrderBy(null);
    SymbolMap expressionMapping = SymbolMap.createSymbolMap(delete.getGroup(), query.getProjectedSymbols(), metadata);
   
    query.setSelect(new Select());
    ExpressionMappingVisitor emv = new ExpressionMappingVisitor(expressionMapping.asMap(), true);
   
    Criteria crit = delete.getCriteria();
    if (crit != null) {
      PostOrderNavigator.doVisit(crit, emv);
      query.setCriteria(Criteria.combineCriteria(query.getCriteria(), crit));
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.