Examples of useSchedulingDataFor()


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

        order.setName("Order name " + UUID.randomUUID());
        order.setInitDate(new Date());
        order.setCalendar(configurationDAO.getConfiguration()
                .getDefaultCalendar());
        OrderVersion version = setupVersionUsing(scenarioManager, order);
        order.useSchedulingDataFor(version);

        orderDAO.save(order);
        orderDAO.flush();
        try {
            return orderDAO.find(order.getId());
View Full Code Here

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

        order.setName("Order name " + UUID.randomUUID());
        order.setInitDate(new Date());
        order.setCalendar(configurationDAO.getConfiguration()
                .getDefaultCalendar());
        OrderVersion version = setupVersionUsing(scenarioManager, order);
        order.useSchedulingDataFor(version);

        orderDAO.save(order);
        orderDAO.flush();
        try {
            return orderDAO.find(order.getId());
View Full Code Here

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

        order.setName("Order name " + UUID.randomUUID());
        order.setInitDate(new Date());
        order.setCalendar(configurationDAO.getConfiguration()
                .getDefaultCalendar());
        OrderVersion version = setupVersionUsing(scenarioManager, order);
        order.useSchedulingDataFor(version);

        orderDAO.save(order);
        orderDAO.flush();
        try {
            return orderDAO.find(order.getId());
View Full Code Here

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

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

    private Worker givenValidWorker() {
        Worker worker = Worker.create();
View Full Code Here

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

        order.setCalendar(configurationDAO.getConfiguration()
                .getDefaultCalendar());

        OrderVersion orderVersion = scenario.addOrder(order);
        order.setVersionForScenario(scenario, orderVersion);
        order.useSchedulingDataFor(orderVersion);
        OrderLine orderLine = OrderLine
                .createOrderLineWithUnfixedPercentage(1000);
        order.add(orderLine);
        orderLine.setCode(UUID.randomUUID().toString());
        orderLine.setName(randomize("order-line-name"));
View Full Code Here

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

        order.setCode(UUID.randomUUID().toString());
        order.setName("Order name " + UUID.randomUUID());
        order.setInitDate(new Date());
        order.setCalendar(configurationDAO.getConfiguration().getDefaultCalendar());
        OrderVersion version = OrderModelTest.setupVersionUsing(scenarioManager, order);
        order.useSchedulingDataFor(version);

        OrderLine orderLine = OrderLine.createOrderLineWithUnfixedPercentage(1000);
        orderLine.useSchedulingDataFor(version);
        order.add(orderLine);
        orderLine.setCode(UUID.randomUUID().toString());
View Full Code Here

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

    @Override
    @Transactional(readOnly = true)
    public void createTemplateFrom(OrderElement orderElement) {
        initializeAcompanyingObjectsOnConversation();
        Order order = orderDAO.loadOrderAvoidingProxyFor(orderElement);
        order.useSchedulingDataFor(getCurrentScenario());
        OrderElement orderElementOrigin = orderElementDAO
                .findExistingEntity(orderElement
                .getId());
        template = orderElementOrigin.createTemplate();
        loadAssociatedData(template);
View Full Code Here

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

    @Override
    @Transactional(readOnly = true)
    public Order getOrderByTask(TaskElement task) {
        Order result = orderDAO.loadOrderAvoidingProxyFor(task
                .getOrderElement());
        result.useSchedulingDataFor(scenarioManager.getCurrent());
        return result;
    }

    @Override
    @Transactional(readOnly = true)
View Full Code Here

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

    public Order createOrder(Scenario currentScenario) {
        Order order = Order.create();
        order.setVersionForScenario(currentScenario, OrderVersion
                .createInitialVersion(currentScenario));
        order.useSchedulingDataFor(currentScenario);
        order.setCalendar(calendar);
        order.initializeTemplate(this);
        return setupGroupParts(setupSchedulingStateType(order));
    }
View Full Code Here

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

    public static TaskGroup createValidTaskGroup() {
        HoursGroup hoursGroup = new HoursGroup();
        hoursGroup.setWorkingHours(3);
        Order order = new Order();
        order.useSchedulingDataFor(TaskTest.mockOrderVersion());
        order.setInitDate(new Date());
        OrderLine orderLine = OrderLine.create();
        order.add(orderLine);
        SchedulingDataForVersion version = TaskElementTest
                .mockSchedulingDataForVersion(orderLine);
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.