Package org.libreplan.business.orders.entities

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


project.calendarName));
        } else {
            ((Order) orderElement).setCalendar(calendar);
        }

        orderElement.useSchedulingDataFor(orderVersion);

        List<OrderElement> children = new ArrayList<OrderElement>();

        for (OrderElementDTO task : project.tasks) {
            children.add(convertImportTaskToOrderElement(orderVersion, task));
View Full Code Here


        } else {

            orderElement = OrderLineGroup.createUnvalidated(UUID.randomUUID()
                    .toString());

            orderElement.useSchedulingDataFor(orderVersion);
        }

        List<OrderElement> children = new ArrayList<OrderElement>();

        for (OrderElementDTO childrenTask : task.children) {
View Full Code Here

    @Test
    @Transactional
    public void ifAnOrderLineIsScheduledItsTypeChanges() {
        Order order = givenOrderFromPrepareForCreate();
        OrderElement line = OrderLine.createOrderLineWithUnfixedPercentage(20);
        line.useSchedulingDataFor(order.getCurrentOrderVersion());
        line.getSchedulingState().unschedule();
        order.add(line);
        assertFalse(order.getSchedulingState().isSomewhatScheduled());
        line.getSchedulingState().schedule();
        assertTrue(order.getSchedulingState().isSomewhatScheduled());
View Full Code Here

            } else { // orderElementDTO instanceof OrderLineGroupDTO
                checkOrderElementDTOCode(orderElementDTO, "OrderLineGroupDTO");
                orderElement = OrderLineGroup
                        .createUnvalidated(orderElementDTO.code);
            }
            orderElement.useSchedulingDataFor(parentOrderVersion);
            List<OrderElement> children = new ArrayList<OrderElement>();
            for (OrderElementDTO element : ((OrderLineGroupDTO) orderElementDTO).children) {
                children.add(toEntity(parentOrderVersion, element,
                        configuration));
            }
View Full Code Here

    private void updateAdvancePercentage(OrderVersion orderVersion, OrderElement orderElement) {
        orderElement.useSchedulingDataFor(orderVersion);
        OrderElement parent = orderElement.getParent();
        while (parent != null) {
            parent.useSchedulingDataFor(orderVersion);
            parent = parent.getParent();
        }
        orderElement.updateAdvancePercentageTaskElement();
    }
}
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.