Example usage for org.apache.commons.collections.map MultiKeyMap mapIterator

List of usage examples for org.apache.commons.collections.map MultiKeyMap mapIterator

Introduction

In this page you can find the example usage for org.apache.commons.collections.map MultiKeyMap mapIterator.

Prototype

public MapIterator mapIterator() 

Source Link

Usage

From source file:org.apromore.dao.jpa.FragmentDistanceRepositoryCustomImpl.java

@Override
@Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = false)
public void saveDistances(final MultiKeyMap distanceMap) {
    MapIterator mi = distanceMap.mapIterator();
    List<DistanceDO> distances = new ArrayList<>();
    while (mi.hasNext()) {
        MultiKey fragmentIds = (MultiKey) mi.next();
        Double ged = (Double) mi.getValue();

        if (getDistance((Integer) fragmentIds.getKey(0), (Integer) fragmentIds.getKey(1)) == null) {
            distances/*from   www .  j av a 2  s.  c  o m*/
                    .add(new DistanceDO((Integer) fragmentIds.getKey(0), (Integer) fragmentIds.getKey(1), ged));
        }
    }
    persistDistance(distances);
}