Package org.libreplan.business.orders.entities

Examples of org.libreplan.business.orders.entities.Order.useSchedulingDataFor()


        order.setCalendar(basicCalendar);
        OrderVersion orderVersion = ResourceAllocationDAOTest
                .setupVersionUsing(scenarioManager, order);
        orderElementDAO.save(order);
        orderElementDAO.flush();
        order.useSchedulingDataFor(orderVersion);
        return order;
    }

    @Test
    @Transactional
View Full Code Here


        OrderVersion orderVersion = ResourceAllocationDAOTest
                .setupVersionUsing(scenarioManager, order);
        order.setName("bla-" + UUID.randomUUID());
        order.setInitDate(new Date());
        order.setCode("code-" + UUID.randomUUID());
        order.useSchedulingDataFor(orderVersion);
        order.add(orderLine);

        //add a basic calendar
        BaseCalendar basicCalendar = BaseCalendarTest.createBasicCalendar();
        calendarDAO.save(basicCalendar);
View Full Code Here

    private Order createValidOrder() {
        Order order = Order.create();
        OrderVersion orderVersion = ResourceAllocationDAOTest
                .setupVersionUsing(scenarioManager, order);
        order.useSchedulingDataFor(orderVersion);
        order.setDescription("description");
        order.setInitDate(CriterionSatisfactionDAOTest.year(2000)
                .toDateTimeAtStartOfDay().toDate());
        order.setName("name");
        order.setResponsible("responsible");
View Full Code Here

        OrderVersion orderVersion = order.getOrderVersionFor(scenarioManager
                .getCurrent());
        OrderElement orderElement = OrderElementTest
                .givenOrderLineGroupWithTwoOrderLines(orderVersion, 2000, 3000);
        order.add(orderElement);
        order.useSchedulingDataFor(order.getOrderVersionFor(scenarioManager
                .getCurrent()));

        List<OrderElement> children = orderElement.getChildren();

        AdvanceType advanceType = PredefinedAdvancedTypes.UNITS.getType();
View Full Code Here

    private Order reload(Order order) {
        ensureOrderVersionsAreNotProxies();
        Order result = orderDAO.findExistingEntity(order.getId());
        Scenario current = scenarioManager.getCurrent();
        result.useSchedulingDataFor(current);
        return result;
    }

    private void ensureOrderVersionsAreNotProxies() {
        List<Long> orderVersionIds = transactionService
View Full Code Here

        BaseCalendar basicCalendar = BaseCalendarTest.createBasicCalendar();
        calendarDAO.save(basicCalendar);
        order.setCalendar(basicCalendar);
        OrderVersion orderVersion = ResourceAllocationDAOTest
                .setupVersionUsing(scenarioManager, order);
        order.useSchedulingDataFor(orderVersion);
        return order;
    }

    private Order createValidOrderWithDeadlineCommunications(String name) {
        Order order = createValidOrder(name);
View Full Code Here

        OrderVersion orderVersion = ResourceAllocationDAOTest
                .setupVersionUsing(scenarioManager, order);
        order.setName("bla-" + UUID.randomUUID());
        order.setInitDate(new Date());
        order.setCode("code-" + UUID.randomUUID());
        order.useSchedulingDataFor(orderVersion);
        order.add(orderLine);
        order.setCalendar(configurationDAO.getConfiguration()
                .getDefaultCalendar());
        try {
            orderDAO.save(order);
View Full Code Here

                isOfType(PositionConstraintType.AS_SOON_AS_POSSIBLE));
    }

    private void addOrderTo(OrderElement orderElement) {
        Order order = new Order();
        order.useSchedulingDataFor(TaskTest.mockOrderVersion());
        order.setInitDate(new Date());
        order.add(orderElement);
    }

    @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.