01: package com.technoetic.xplanner.actions;
02:
03: import java.util.Collection;
04: import java.util.Iterator;
05:
06: import com.technoetic.xplanner.domain.UserStory;
07:
08: public class DomainOrderer {
09: public static int[][] buildStoryIdNewOrderArray(Collection stories) {
10: int[][] storyIdAndNewOrder = new int[stories.size()][2];
11: int index = 0;
12: for (Iterator iterator = stories.iterator(); iterator.hasNext(); index++) {
13: UserStory userStory = (UserStory) iterator.next();
14: storyIdAndNewOrder[index][0] = userStory.getId();
15: storyIdAndNewOrder[index][1] = userStory.getOrderNo();
16: }
17: return storyIdAndNewOrder;
18: }
19: }
|