Package org.libreplan.business.planner.entities

Examples of org.libreplan.business.planner.entities.GenericResourceAllocation$ResourcesSatisfyingCriterionsSelector


        return ResourcesPerDayModification
                .create(newGeneric, getResourcesPerDayEditedValue(), this.resources);
    }

    private GenericResourceAllocation createGenericAllocation(Task task) {
        GenericResourceAllocation result = GenericResourceAllocation.create(
                task, resourceType, criterions);
        GenericResourceAllocation origin = (GenericResourceAllocation) getOrigin();
        if (origin != null) {
            result.overrideConsolidatedDayAssignments(origin);
            result.setAssignmentFunctionWithoutApply(origin.getAssignmentFunction());
        }
        return result;
    }
View Full Code Here


            specificResourceAllocation.setResource(worker);

            return specificResourceAllocation;
        }
        if (ResourceAllocationType.GENERIC_RESOURCE_ALLOCATION.equals(type)) {
            GenericResourceAllocation specificResourceAllocation = GenericResourceAllocation
                    .createForTesting(ResourcesPerDay.amount(1), task);
            return specificResourceAllocation;
        }
        return null;
    }
View Full Code Here

    }

    @Test
    @Transactional
    public void testSaveGenericResourceAllocation() {
        GenericResourceAllocation resourceAllocation = createValidGenericResourceAllocation();
        resourceAllocationDAO.save(resourceAllocation);
        assertTrue(resourceAllocationDAO.exists(resourceAllocation.getId()));
    }
View Full Code Here

    @Test
    @Transactional
    public void testRemoveGenericResourceAllocation()
            throws InstanceNotFoundException {
        GenericResourceAllocation resourceAllocation = createValidGenericResourceAllocation();
        resourceAllocationDAO.save(resourceAllocation);
        resourceAllocationDAO.remove(resourceAllocation.getId());
        assertFalse(resourceAllocationDAO.exists(resourceAllocation.getId()));
    }
View Full Code Here

    @Transactional
    public void testListGenericResourceAllocation() {
        int previous = resourceAllocationDAO.list(ResourceAllocation.class)
                .size();

        GenericResourceAllocation resourceAllocation1 = createValidGenericResourceAllocation();
        resourceAllocationDAO.save(resourceAllocation1);
        ResourceAllocation<?> resourceAllocation2 = createValidGenericResourceAllocation();
        resourceAllocationDAO.save(resourceAllocation1);
        resourceAllocationDAO.save(resourceAllocation2);
View Full Code Here

TOP

Related Classes of org.libreplan.business.planner.entities.GenericResourceAllocation$ResourcesSatisfyingCriterionsSelector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.