ItEr27S06CUAsignacionGrupoRecursosAPlanificacionItEr26S07: Moving ResourceAllocationWithDesiredResourcesPerDay to top level and allocationalgorithms package

This commit is contained in:
Óscar González Fernández 2009-09-21 18:01:46 +02:00
parent 37497a3b13
commit 5fa07daa1d
5 changed files with 29 additions and 25 deletions

View file

@ -17,6 +17,7 @@ import org.navalplanner.business.calendars.entities.BaseCalendar;
import org.navalplanner.business.calendars.entities.SameWorkHoursEveryDay;
import org.navalplanner.business.common.BaseEntity;
import org.navalplanner.business.planner.entities.allocationalgorithms.AllocatorForTaskDurationAndSpecifiedResourcesPerDay;
import org.navalplanner.business.planner.entities.allocationalgorithms.ResourceAllocationWithDesiredResourcesPerDay;
import org.navalplanner.business.resources.entities.Resource;
/**
@ -26,28 +27,6 @@ import org.navalplanner.business.resources.entities.Resource;
public abstract class ResourceAllocation<T extends DayAssignment> extends
BaseEntity {
public static class ResourceAllocationWithDesiredResourcesPerDay {
private final ResourceAllocation<?> resourceAllocation;
private final ResourcesPerDay resourcesPerDay;
public ResourceAllocationWithDesiredResourcesPerDay(
ResourceAllocation<?> resourceAllocation,
ResourcesPerDay resourcesPerDay) {
this.resourceAllocation = resourceAllocation;
this.resourcesPerDay = resourcesPerDay;
}
public ResourceAllocation<?> getResourceAllocation() {
return resourceAllocation;
}
public ResourcesPerDay getResourcesPerDay() {
return resourcesPerDay;
}
}
public static AllocationsCurried allocating(
List<ResourceAllocationWithDesiredResourcesPerDay> resourceAllocations) {
return new AllocationsCurried(resourceAllocations);

View file

@ -6,7 +6,6 @@ import org.navalplanner.business.planner.entities.GenericResourceAllocation;
import org.navalplanner.business.planner.entities.ResourceAllocation;
import org.navalplanner.business.planner.entities.ResourcesPerDay;
import org.navalplanner.business.planner.entities.SpecificResourceAllocation;
import org.navalplanner.business.planner.entities.ResourceAllocation.ResourceAllocationWithDesiredResourcesPerDay;
import org.navalplanner.business.resources.entities.Resource;
public class AllocatorForTaskDurationAndSpecifiedResourcesPerDay {

View file

@ -0,0 +1,26 @@
package org.navalplanner.business.planner.entities.allocationalgorithms;
import org.navalplanner.business.planner.entities.ResourceAllocation;
import org.navalplanner.business.planner.entities.ResourcesPerDay;
public class ResourceAllocationWithDesiredResourcesPerDay {
private final ResourceAllocation<?> resourceAllocation;
private final ResourcesPerDay resourcesPerDay;
public ResourceAllocationWithDesiredResourcesPerDay(
ResourceAllocation<?> resourceAllocation,
ResourcesPerDay resourcesPerDay) {
this.resourceAllocation = resourceAllocation;
this.resourcesPerDay = resourcesPerDay;
}
public ResourceAllocation<?> getResourceAllocation() {
return resourceAllocation;
}
public ResourcesPerDay getResourcesPerDay() {
return resourcesPerDay;
}
}

View file

@ -18,7 +18,7 @@ import org.navalplanner.business.planner.entities.ResourceAllocation;
import org.navalplanner.business.planner.entities.ResourcesPerDay;
import org.navalplanner.business.planner.entities.SpecificResourceAllocation;
import org.navalplanner.business.planner.entities.Task;
import org.navalplanner.business.planner.entities.ResourceAllocation.ResourceAllocationWithDesiredResourcesPerDay;
import org.navalplanner.business.planner.entities.allocationalgorithms.ResourceAllocationWithDesiredResourcesPerDay;
import org.navalplanner.business.resources.entities.Resource;
import org.navalplanner.business.resources.entities.Worker;

View file

@ -18,7 +18,7 @@ import org.navalplanner.business.planner.entities.GenericResourceAllocation;
import org.navalplanner.business.planner.entities.ResourceAllocation;
import org.navalplanner.business.planner.entities.SpecificResourceAllocation;
import org.navalplanner.business.planner.entities.Task;
import org.navalplanner.business.planner.entities.ResourceAllocation.ResourceAllocationWithDesiredResourcesPerDay;
import org.navalplanner.business.planner.entities.allocationalgorithms.ResourceAllocationWithDesiredResourcesPerDay;
import org.navalplanner.business.resources.daos.IResourceDAO;
import org.navalplanner.business.resources.entities.Criterion;
import org.navalplanner.business.resources.entities.CriterionSatisfaction;