ItEr29S16CUCreacionProxectoCategorizacionTraballoItEr10S11: Added new method to Order to get the associated TaskElement. This will be needed in the future.
This commit is contained in:
parent
1d8121da11
commit
ed97494a05
1 changed files with 10 additions and 1 deletions
|
|
@ -21,7 +21,6 @@
|
|||
package org.navalplanner.business.orders.entities;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
|
@ -31,6 +30,7 @@ import org.navalplanner.business.common.exceptions.ValidationException;
|
|||
import org.navalplanner.business.planner.entities.DayAssignment;
|
||||
import org.navalplanner.business.planner.entities.ResourceAllocation;
|
||||
import org.navalplanner.business.planner.entities.TaskElement;
|
||||
import org.navalplanner.business.planner.entities.TaskGroup;
|
||||
import org.navalplanner.business.resources.entities.Resource;
|
||||
|
||||
/**
|
||||
|
|
@ -84,6 +84,15 @@ public class Order extends OrderLineGroup implements IValidable {
|
|||
return new ArrayList<OrderElement>(getChildren());
|
||||
}
|
||||
|
||||
public TaskGroup getAssociatedTaskElement() {
|
||||
Set<TaskElement> taskElements = this.getTaskElements();
|
||||
if (taskElements != null) {
|
||||
return (TaskGroup) taskElements.iterator().next();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public List<TaskElement> getAssociatedTasks() {
|
||||
ArrayList<TaskElement> result = new ArrayList<TaskElement>();
|
||||
for (OrderElement orderElement : getChildren()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue