Package java.util

Examples of java.util.Map


            Arrays.asList(new Object[] { "a" })//$NON-NLS-1$
            Arrays.asList(new Object[] { "b" }) }; //$NON-NLS-1$

        FakeDataManager dataMgr = new FakeDataManager();
        dataMgr.setThrowBlocked(true);
        Map valueMap = new HashMap();
        valueMap.put("1", "a"); //$NON-NLS-1$ //$NON-NLS-2$
        valueMap.put("2", "b"); //$NON-NLS-1$ //$NON-NLS-2$
        dataMgr.defineCodeTable("pm1.g1", "e1", "e2", valueMap); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        
        helpTestProject(projectElements, data, elements, expected, dataMgr);       
    }   
View Full Code Here


                                      JoinRegion joinRegion, CommandContext context) throws QueryMetadataException,
                                                            TeiidComponentException, QueryPlannerException {
        //TODO: consider moving select criteria if it is preventing a join from being pushed down
        //TODO: make the criteria checks based upon a guess at selectivity
       
        Map accessMap = getAccessMap(metadata, capFinder, joinRegion);
       
        boolean structureChanged = false;
       
        //search for combinations of join sources that should be pushed down
        for (Iterator accessNodeIter = accessMap.entrySet().iterator(); accessNodeIter.hasNext();) {
            Map.Entry entry = (Map.Entry)accessNodeIter.next();
           
            List<PlanNode> accessNodes = (List)entry.getValue();
           
            if (accessNodes.size() < 2) {
View Full Code Here

     */
    private Map getAccessMap(QueryMetadataInterface metadata,
                             CapabilitiesFinder capFinder,
                             JoinRegion joinRegion) throws QueryMetadataException,
                                                   TeiidComponentException {
        Map accessMap = new HashMap();
       
        for (PlanNode node : joinRegion.getJoinSourceNodes().values()) {
            /* check to see if we are directly over an access node.  in the event that the join source root
             * looks like select->access, we still won't consider this node for pushing
             */
 
View Full Code Here

   
   
    static class SourceFixer extends MappingVisitor{
        public void visit(MappingSourceNode sourceNode) {
            ResultSetInfo info = getResultInfo(sourceNode.getResultName());
            Map symbolMap = new HashMap();
            for (Iterator i = info.getCommand().getProjectedSymbols().iterator(); i.hasNext();) {
                ElementSymbol element = (ElementSymbol)i.next();
                symbolMap.put(element, element);
            }
            sourceNode.setSymbolMap(symbolMap);
            sourceNode.setResultSetInfo(info);
        }
View Full Code Here

            case '<':
            {
                int theNextByte = is.read();
                if( theNextByte == '<' )
                {
                    Map result = new HashMap();
                    //we are reading a dictionary
                    Object key = parseNextToken( is );
                    while( key instanceof LiteralName && key != MARK_END_OF_DICTIONARY )
                    {
                        Object value = parseNextToken( is );
                        result.put( ((LiteralName)key).name, value );
                        key = parseNextToken( is );
                    }
                    retval = result;
                }
                else
View Full Code Here

            addNamespaceDeclarations(namespaces);
        }

        // Only get the property values actually stored in the MappingNode, not
        // default values also
        Map properties = node.getNodeProperties();

        addElementProperties(properties );

        Iterator children = node.getChildren().iterator();
        while ( children.hasNext() ) {
View Full Code Here

    }
  }
 
  private static void injectProperties(ExecutionFactory ef, final Translator data) throws InvocationTargetException, IllegalAccessException, DeploymentException{
    Map<Method, TranslatorProperty> props = TranslatorUtil.getTranslatorProperties(ef.getClass());
    Map p = data.getProperties();
    TreeMap<String, String> caseInsensitivProps = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
    caseInsensitivProps.putAll(p);
    for (Method method:props.keySet()) {
      TranslatorProperty tp = props.get(method);
      String propertyName = getPropertyName(method);
View Full Code Here

        XMLPlan plan = (XMLPlan)helpTestProcess("SELECT * FROM xmltest.doc9 WHERE context(SupplierID, SupplierID)='52'", expectedDoc, metadata, dataMgr); //$NON-NLS-1$

        // check the staging base line (unknown cost)
        // one for staging and for unloading
        Map stats = XMLProgramUtil.getProgramStats(plan.getOriginalProgram());
        assertEquals(2, ((List)stats.get(ExecStagingTableInstruction.class)).size());
    }
View Full Code Here

    public static String getFileName(MessageContext msgCtx, VFSOutTransportInfo vfsOutInfo) {
        String fileName = null;

        // first preference to a custom filename set on the current message context
        Map transportHeaders = (Map) msgCtx.getProperty(MessageContext.TRANSPORT_HEADERS);
        if (transportHeaders != null) {
            fileName = (String) transportHeaders.get(VFSConstants.REPLY_FILE_NAME);
        }

        // if not, does the service (in its service.xml) specify one?
        if (fileName == null) {
            Parameter param = msgCtx.getAxisService().getParameter(VFSConstants.REPLY_FILE_NAME);
View Full Code Here

  @Test
  public void test() throws Exception
  {

    View view = createStrictMock(View.class);
    Map model = createStrictMock(Map.class);
    ActionContext context = createStrictMock(ActionContext.class);
    HttpServletRequest request = createStrictMock(HttpServletRequest.class);
    HttpServletResponse response = createStrictMock(HttpServletResponse.class);

    SpringRenderingViewAdapter va = new SpringRenderingViewAdapter(view, model);
View Full Code Here

TOP

Related Classes of java.util.Map

Copyright © 2018 www.massapicom. 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.