Resource resource,
Map<Order, List<ResourceAllocation<?>>> byOrder) {
List<LoadTimeLine> result = new ArrayList<LoadTimeLine>();
for (Order order : byOrder.keySet()) {
TimeLineRole<BaseEntity> role = getCurrentTimeLineRole(order);
result.add(new LoadTimeLine(buildTimeLine(resource,
order.getName(), byOrder.get(order), "resource", role),
buildTimeLinesForOrder(resource, byOrder.get(order))));
}
Collections.sort(result, LoadTimeLine.byStartAndEndDate());
return result;