Package org.apache.commons.collections

Examples of org.apache.commons.collections.MultiHashMap$Values


      TableIdentifier tableIdentifier = TableIdentifier.create(table);
      if(table.getColumn(column)!=null) {
        throw new MappingException("Column " + column.getName() + " already exists in table " + tableIdentifier );
      }
     
      MultiMap map = MetaAttributeBinder.loadAndMergeMetaMap( element, new MultiHashMap());
      if(map!=null && !map.isEmpty()) {
        repository.addMetaAttributeInfo( tableIdentifier, column.getName(), map);
      }
     
      table.addColumn(column);
View Full Code Here


      filter.setMatchSchema(element.attributeValue("match-schema") );
      filter.setMatchName(element.attributeValue("match-name") );
      filter.setExclude(Boolean.valueOf(element.attributeValue("exclude") ) );
      filter.setPackage(element.attributeValue("package") );
     
      MultiMap map = MetaAttributeBinder.loadAndMergeMetaMap( element, new MultiHashMap());
      if(map!=null && !map.isEmpty()) {
        filter.setMetaAttributes( map );
      } else {
        filter.setMetaAttributes( null );       
      }
View Full Code Here

    this.m_keyMMap = ecdw.get_keyMap();
  }

    // TODO: don't hardcode initial size
    private void createBlankCache() {
        this.m_eventMMap = new MultiHashMap(100);
        this.m_keyMMap = new MultiHashMap(100);
    }
View Full Code Here

                                         * TransactionClass
                                         * >
                                         */groupToMap(
      Collection<TransactionClass> transactions,
      String groupByPropertyName) throws Exception {
    MultiHashMap/* <String, TransactionClass> */resultMap = new MultiHashMap/*
                                         * <
                                         * String
                                         * ,
                                         * TransactionClass
                                         * >
                                         */();
    for (TransactionClass transaction : transactions) {
      String propertyValue = ReflectionBoostUtils.getProperty(
          transaction, groupByPropertyName);
      resultMap.put(propertyValue, transaction);
    }

    return resultMap;
  }
View Full Code Here

    return result;
  }

  public static <TransactionClass extends SecuritiesTransaction> List<SummarizedTransaction<TransactionClass>> groupByAsset(
      Collection<TransactionClass> transactions) throws Exception {
    MultiHashMap/* <String, TransactionClass> */groupedTransactions = groupToMapByAsset(transactions);
    List<SummarizedTransaction<TransactionClass>> result = group(
        groupedTransactions, ASSET);
    for (SummarizedTransaction<TransactionClass> sum : result) {
      if (!sum.getSubtransactions().isEmpty()) {
        TransactionClass firstTransaction = sum.getSubtransactions()
View Full Code Here

    return result;
  }

  public static <TransactionClass extends SecuritiesTransaction> List<SummarizedTransaction<TransactionClass>> groupByAccount(
      Collection<TransactionClass> transactions) throws Exception {
    MultiHashMap/* <String, TransactionClass> */groupedTransactions = groupToMapByAccount(transactions);
    return group(groupedTransactions, ACCOUNT);
  }
View Full Code Here

      */
     public SummarizedTransaction<SummarizedTransaction<SummarizedTransaction<SecuritiesTransaction>>> getAllTransactionsGroupByAsset()
     {
       List<SummarizedTransaction<SecuritiesTransaction>> transactions = getAllTransactions();//SummarizedTransaction.filterQuantityChangingTransactions(getAllTransactions());
      
       MultiHashMap/*<String, SummarizedTransaction<SecuritiesTransaction>>*/ resultMap = new MultiHashMap/*<String, SummarizedTransaction<SecuritiesTransaction>>*/();
       for (SummarizedTransaction<SecuritiesTransaction> transaction: transactions)
       {
         resultMap.put( transaction.getAsset(), transaction);
       }
      
       ArrayList<String> keys = new ArrayList<String>(resultMap.keySet());
       Collections.sort(keys);

       ArrayList<SummarizedTransaction<SummarizedTransaction<SecuritiesTransaction>>> result = new ArrayList<SummarizedTransaction<SummarizedTransaction<SecuritiesTransaction>>>();
      
       for (String key: keys)
       {
         result.add(new SummarizedTransaction(resultMap.getCollection(key)));
       }
      
       SummarizedTransaction<SummarizedTransaction<SummarizedTransaction<SecuritiesTransaction>>> resultTrans = new SummarizedTransaction<SummarizedTransaction<SummarizedTransaction<SecuritiesTransaction>>>(result) ;
       resultTrans.setTransactionType("∑");
       return resultTrans;
View Full Code Here

  /*
   * Takes all the report's charts and inserts them in their corresponding bands
   */
  protected void layoutCharts() {
    //Pre-sort charts by group column
    MultiMap mmap = new MultiHashMap();
    for (Iterator iter = getReport().getCharts().iterator(); iter.hasNext();) {
      DJChart djChart = (DJChart) iter.next();
      mmap.put(djChart.getColumnsGroup(), djChart);
    }

    for (Iterator iterator = mmap.keySet().iterator(); iterator.hasNext();) {
      Object key =  iterator.next();
      Collection charts = (Collection) mmap.get(key);
      ArrayList l = new ArrayList(charts);
      //Reverse iteration of the charts to meet insertion order
      for (int i = l.size(); i > 0; i--) {
        DJChart djChart = (DJChart) l.get(i-1);
        JRDesignChart chart = createChart(djChart);
View Full Code Here

        this.m_keyMMap = ecdw.get_keyMap();
    }

    protected final void createBlankCache() {
        // TODO: don't hardcode initial size
        this.m_eventMMap = new MultiHashMap(100);
        this.m_keyMMap = new MultiHashMap(100);
    }
View Full Code Here

    {
        LdifComposer composer = new LdifComposerImpl();
        MultiMap map = new MultiMap()
        {
            // FIXME Stop forking commons-collections.
            private final MultiHashMap map = new MultiHashMap();

            public Object remove( Object arg0, Object arg1 )
            {
                return map.remove( arg0, arg1 );
            }

            public int size()
            {
                return map.size();
            }

            public Object get( Object arg0 )
            {
                return map.get( arg0 );
            }

            public boolean containsValue( Object arg0 )
            {
                return map.containsValue( arg0 );
            }

            public Object put( Object arg0, Object arg1 )
            {
                return map.put( arg0, arg1 );
            }

            public Object remove( Object arg0 )
            {
                return map.remove( arg0 );
            }

            public Collection values()
            {
                return map.values();
            }

            public boolean isEmpty()
            {
                return map.isEmpty();
            }

            public boolean containsKey( Object key )
            {
                return map.containsKey( key );
            }

            public void putAll( Map arg0 )
            {
                map.putAll( arg0 );
            }

            public void clear()
            {
                map.clear();
            }

            public Set keySet()
            {
                return map.keySet();
            }

            public Set entrySet()
            {
                return map.entrySet();
            }
        };
       
        Attributes attrs = ( Attributes ) getValue();
        try
        {
            NamingEnumeration e = attrs.getAll();
            while( e.hasMore() )
            {
                Attribute attr = ( Attribute ) e.next();
                NamingEnumeration e2 = attr.getAll();
                while( e2.hasMoreElements() )
                {
                    Object value = e2.next();
                    map.put( attr.getID(), value );
                }
            }

            return composer.compose( map );
        }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.MultiHashMap$Values

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.