Remove unnecessary fields
FEA: ItEr61OTS04PlanificacionHaciaAtras
This commit is contained in:
parent
8229fdf032
commit
3c192e0cf8
2 changed files with 0 additions and 27 deletions
|
|
@ -77,8 +77,6 @@ public class AllocationResult {
|
|||
|
||||
private final AggregateOfResourceAllocations aggregate;
|
||||
|
||||
private final Integer daysDuration;
|
||||
|
||||
private final CalculatedValue calculatedValue;
|
||||
|
||||
private final Task task;
|
||||
|
|
@ -101,8 +99,6 @@ public class AllocationResult {
|
|||
this.task = task;
|
||||
this.calculatedValue = calculatedValue;
|
||||
this.aggregate = aggregate;
|
||||
this.daysDuration = aggregate.isEmpty() ? task.getDaysDuration()
|
||||
: aggregate.getDaysDuration();
|
||||
this.end = aggregate.isEmpty() ? null : aggregate.getEnd();
|
||||
this.newAllocations = newAllocations;
|
||||
this.modified = modified;
|
||||
|
|
@ -112,10 +108,6 @@ public class AllocationResult {
|
|||
return aggregate;
|
||||
}
|
||||
|
||||
public Integer getDaysDuration() {
|
||||
return daysDuration;
|
||||
}
|
||||
|
||||
private List<ResourceAllocation<?>> getNew() {
|
||||
return newAllocations;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ package org.navalplanner.web.planner.allocation;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
|
@ -59,8 +58,6 @@ public class AllocationRowsHandler {
|
|||
|
||||
private CalculatedValue calculatedValue;
|
||||
|
||||
private Integer daysDuration;
|
||||
|
||||
private final IWorkerFinder workersFinder;
|
||||
|
||||
private AllocationRowsHandler(Task task, List<AllocationRow> initialRows,
|
||||
|
|
@ -69,7 +66,6 @@ public class AllocationRowsHandler {
|
|||
this.workersFinder = workersFinder;
|
||||
this.currentRows = new ArrayList<AllocationRow>(initialRows);
|
||||
this.calculatedValue = task.getCalculatedValue();
|
||||
this.daysDuration = task.getDaysDuration();
|
||||
}
|
||||
|
||||
public void addSpecificResourceAllocationFor(List<Resource> resource) {
|
||||
|
|
@ -251,7 +247,6 @@ public class AllocationRowsHandler {
|
|||
createDerived();
|
||||
AllocationResult result = AllocationResult.create(task,
|
||||
calculatedValue, currentRows);
|
||||
daysDuration = result.getDaysDuration();
|
||||
AllocationRow.loadDataFromLast(currentRows);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -318,7 +313,6 @@ public class AllocationRowsHandler {
|
|||
|
||||
public void setCalculatedValue(CalculatedValue calculatedValue) {
|
||||
this.calculatedValue = calculatedValue;
|
||||
this.daysDuration = task.getDaysDuration();
|
||||
}
|
||||
|
||||
public AllocationResult getInitialAllocation(Scenario currentScenario) {
|
||||
|
|
@ -330,10 +324,6 @@ public class AllocationRowsHandler {
|
|||
return task;
|
||||
}
|
||||
|
||||
public Integer getDaysDuration() {
|
||||
return daysDuration;
|
||||
}
|
||||
|
||||
public Set<Resource> getAllocationResources() {
|
||||
Set<Resource> result = new HashSet<Resource>();
|
||||
for (AllocationRow each : currentRows) {
|
||||
|
|
@ -342,19 +332,10 @@ public class AllocationRowsHandler {
|
|||
return result;
|
||||
}
|
||||
|
||||
public Date getEnd() {
|
||||
LocalDate start = getStartDate();
|
||||
return toDate(start.plusDays(getDaysDuration()));
|
||||
}
|
||||
|
||||
public LocalDate getStartDate() {
|
||||
return new LocalDate(task.getStartDate());
|
||||
}
|
||||
|
||||
private Date toDate(LocalDate date) {
|
||||
return date.toDateTimeAtStartOfDay().toDate();
|
||||
}
|
||||
|
||||
public void removeAll() {
|
||||
for (AllocationRow each : copyOfCurrentRowsToAvoidConcurrentModification()) {
|
||||
remove(each);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue