item.setItemType(ItemType.FEATURE);
item.setDeployment(deployment);
deployment.getItems().add(item);
PmDeployment.instance().persist(item, em, context);
Task task = new Task();
task.setName("Task 1.3.2 name");
task.setEstimation(new Integer(8));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
ItemImplementation ii = new ItemImplementation();
item.getItemImplementation().add(ii);
ii.setItem(item);
PmDeployment.instance().persist(ii, em, context);
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
TaskEstimation tes = new TaskEstimation();
tes.setEstimation(new Integer(8));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (3*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
Task prevTask = task;
task = new Task();
task.setName("Task 1.3.1 name");
task.setEstimation(new Integer(5));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
task.setNextId(prevTask.getId());
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(5));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (2*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
Item prevItem = item;
item = new Item();
item.setSummary("Item 1.2 summary");
item.setEffort(new Integer(14));
item.setItemKey("P1-2");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() + (4*24*60*60*1000));
item.setDueDate(cal);
item.setDescription("diiba daaba\njou jou");
item.setItemType(ItemType.FEATURE);
item.setNextId(prevItem.getId());
item.setDeployment(deployment);
deployment.getItems().add(item);
PmDeployment.instance().persist(item, em, context);
task = new Task();
task.setName("Task 1.2.2 name");
task.setEstimation(new Integer(8));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
ii = new ItemImplementation();
item.getItemImplementation().add(ii);
ii.setItem(item);
PmDeployment.instance().persist(ii, em, context);
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(8));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (1*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevTask = task;
task = new Task();
task.setName("Task 1.2.1 name");
task.setEstimation(new Integer(5));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
task.setNextId(prevTask.getId());
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(5));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (2*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevItem = item;
item = new Item();
item.setSummary("Item 1.1 summary");
item.setEffort(new Integer(8));
item.setItemKey("P1-1");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() + (4*24*60*60*1000));
item.setDueDate(cal);
item.setDescription("diiba daaba\njou jou");
item.setItemType(ItemType.FEATURE);
item.setNextId(prevItem.getId());
item.setDeployment(deployment);
deployment.getItems().add(item);
PmDeployment.instance().persist(item, em, context);
task = new Task();
task.setName("Task 1.1.2 name");
task.setEstimation(new Integer(8));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
ii = new ItemImplementation();
item.getItemImplementation().add(ii);
ii.setItem(item);
PmDeployment.instance().persist(ii, em, context);
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(8));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (1*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevTask = task;
task = new Task();
task.setName("Task 1.1.1 name");
task.setEstimation(new Integer(5));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
task.setNextId(prevTask.getId());
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(5));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
Deployment prevDeployment = deployment;
deployment = new Deployment();
deployment.setName("release 1.2");
deployment.setReleaseNumber("01");
deployment.setVersionNumber("02");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (4* 7 * 24 * 60 * 60 * 1000));
deployment.setStartTime(cal);
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis());
deployment.setReleaseTime(cal);
deployment.setDescription("jaada jaada jaada...\npada pada pada");
deployment.setNextId(prevDeployment.getId());
deployment.setProduct(product);
product.getDeployment().add(deployment);
PmDeployment.instance().persist(deployment, em, context);
item = new Item();
item.setSummary("Item 2.3 summary");
item.setEffort(new Integer(5));
item.setItemKey("P1-6");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() + (7*24*60*60*1000));
item.setDueDate(cal);
item.setDescription("diiba daaba\njou jou");
item.setItemType(ItemType.FEATURE);
item.setDeployment(deployment);
deployment.getItems().add(item);
PmDeployment.instance().persist(item, em, context);
task = new Task();
task.setName("Task 2.3.2 name");
task.setEstimation(new Integer(8));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
ii = new ItemImplementation();
item.getItemImplementation().add(ii);
ii.setItem(item);
PmDeployment.instance().persist(ii, em, context);
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(8));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (4*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevTask = task;
task = new Task();
task.setName("Task 2.3.1 name");
task.setEstimation(new Integer(5));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
task.setNextId(prevTask.getId());
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(5));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (5*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevItem = item;
item = new Item();
item.setSummary("Item 2.2 summary");
item.setEffort(new Integer(14));
item.setItemKey("P1-5");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() + (4*24*60*60*1000));
item.setDueDate(cal);
item.setDescription("diiba daaba\njou jou");
item.setItemType(ItemType.FEATURE);
item.setNextId(prevItem.getId());
item.setDeployment(deployment);
deployment.getItems().add(item);
PmDeployment.instance().persist(item, em, context);
task = new Task();
task.setName("Task 2.2.2 name");
task.setEstimation(new Integer(8));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
ii = new ItemImplementation();
item.getItemImplementation().add(ii);
ii.setItem(item);
PmDeployment.instance().persist(ii, em, context);
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(8));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (1*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevTask = task;
task = new Task();
task.setName("Task 2.2.1 name");
task.setEstimation(new Integer(5));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
task.setNextId(prevTask.getId());
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(5));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (2*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevItem = item;
item = new Item();
item.setSummary("Item 2.1 summary");
item.setEffort(new Integer(8));
item.setItemKey("P1-4");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() + (4*24*60*60*1000));
item.setDueDate(cal);
item.setDescription("diiba daaba\njou jou");
item.setItemType(ItemType.FEATURE);
item.setNextId(prevItem.getId());
item.setDeployment(deployment);
deployment.getItems().add(item);
PmDeployment.instance().persist(item, em, context);
task = new Task();
task.setName("Task 2.1.2 name");
task.setEstimation(new Integer(8));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
ii = new ItemImplementation();
item.getItemImplementation().add(ii);
ii.setItem(item);
PmDeployment.instance().persist(ii, em, context);
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(8));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (3*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevTask = task;
task = new Task();
task.setName("Task 2.1.1 name");
task.setEstimation(new Integer(5));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
task.setNextId(prevTask.getId());
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(5));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (2*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevDeployment = deployment;
deployment = new Deployment();
deployment.setName("release 1.1");
deployment.setReleaseNumber("01");
deployment.setVersionNumber("01");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (8 * 7 * 24 * 60 * 60 * 1000));
deployment.setStartTime(cal);
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (4 * 7 * 24 * 60 * 60 * 1000));
deployment.setReleaseTime(cal);
deployment.setDescription("jaada jaada jaada...\npada pada pada");
deployment.setNextId(prevDeployment.getId());
deployment.setProduct(product);
product.getDeployment().add(deployment);
PmDeployment.instance().persist(deployment, em, context);
item = new Item();
item.setSummary("Item 3.3 summary");
item.setEffort(new Integer(5));
item.setItemKey("P1-9");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() + (7*24*60*60*1000));
item.setDueDate(cal);
item.setDescription("diiba daaba\njou jou");
item.setItemType(ItemType.FEATURE);
item.setDeployment(deployment);
deployment.getItems().add(item);
PmDeployment.instance().persist(item, em, context);
task = new Task();
task.setName("Task 3.3.2 name");
task.setEstimation(new Integer(8));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
ii = new ItemImplementation();
item.getItemImplementation().add(ii);
ii.setItem(item);
PmDeployment.instance().persist(ii, em, context);
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(8));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (3*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevTask = task;
task = new Task();
task.setName("Task 3.3.1 name");
task.setEstimation(new Integer(5));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
task.setNextId(prevTask.getId());
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(5));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (5*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevItem = item;
item = new Item();
item.setSummary("Item 3.2 summary");
item.setEffort(new Integer(14));
item.setItemKey("P1-8");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() + (4*24*60*60*1000));
item.setDueDate(cal);
item.setDescription("diiba daaba\njou jou");
item.setItemType(ItemType.FEATURE);
item.setNextId(prevItem.getId());
item.setDeployment(deployment);
deployment.getItems().add(item);
PmDeployment.instance().persist(item, em, context);
task = new Task();
task.setName("Task 3.2.2 name");
task.setEstimation(new Integer(8));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
ii = new ItemImplementation();
item.getItemImplementation().add(ii);
ii.setItem(item);
PmDeployment.instance().persist(ii, em, context);
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(8));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (1*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevTask = task;
task = new Task();
task.setName("Task 3.2.1 name");
task.setEstimation(new Integer(5));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
task.setNextId(prevTask.getId());
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(5));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (3*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevItem = item;
item = new Item();
item.setSummary("Item 3.1 summary");
item.setEffort(new Integer(8));
item.setItemKey("P1-7");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() + (4*24*60*60*1000));
item.setDueDate(cal);
item.setDescription("diiba daaba\njou jou");
item.setItemType(ItemType.FEATURE);
item.setNextId(prevItem.getId());
item.setDeployment(deployment);
deployment.getItems().add(item);
PmDeployment.instance().persist(item, em, context);
task = new Task();
task.setName("Task 3.1.2 name");
task.setEstimation(new Integer(8));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
Team team = new Team();
team.setName("Team 1");
product.getTeam().add(team);
team.getProduct().add(product);
PmDeployment.instance().persist(team, em, context);
Sprint sprint = new Sprint();
sprint.setName("P1, Sprint 1");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (7*24*60*60*1000));
sprint.setStartTime(cal);
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() + (21*24*60*60*1000));
sprint.setEndTime(cal);
team.getSprint().add(sprint);
sprint.setTeam(team);
sprint.setDeployment(deployment);
PmDeployment.instance().persist(sprint, em, context);
ii = new ItemImplementation();
item.getItemImplementation().add(ii);
ii.setItem(item);
sprint.getItemImplementation().add(ii);
ii.setSprint(sprint);
PmDeployment.instance().persist(ii, em, context);
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(8));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (1*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(5));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (3*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
PmDeployment.instance().persist(tes, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(10));
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() - (7*24*60*60*1000));
tes.setEstimationDate(new Date(cal.getTimeInMillis()));
tes.setTask(task);
PmDeployment.instance().persist(tes, em, context);
prevTask = task;
task = new Task();
task.setName("Task 3.1.1 name");
task.setEstimation(new Integer(5));
task.setDescription("xxxxxxxx\nyyyyyyyyy");
task.setTaskStatus(TaskStatus.NOT_STARTED);
task.setNextId(prevTask.getId());
ii.getTasks().add(task);
task.setItemImplementation(ii);
PmDeployment.instance().persist(task, em, context);
tes = new TaskEstimation();
tes.setEstimation(new Integer(5));