Collection<? extends ResourceAllocation<?>> allocations) {
Map<Order, List<ResourceAllocation<?>>> result = new HashMap<Order, List<ResourceAllocation<?>>>();
for (ResourceAllocation<?> resourceAllocation : allocations) {
if ((resourceAllocation.isSatisfied())
&& (resourceAllocation.getTask() != null)) {
OrderElement orderElement = resourceAllocation.getTask()
.getOrderElement();
Order order = orderDAO.loadOrderAvoidingProxyFor(orderElement);
initializeIfNeeded(result, order);
result.get(order).add(resourceAllocation);
}