Package org.libreplan.business.orders.entities

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


        orderElement.setDescription(orderElementDTO.description);

        if (configuration.isLabels()) {
            for (LabelReferenceDTO labelDTO : orderElementDTO.labels) {
                try {
                orderElement.addLabel(LabelReferenceConverter.toEntity(labelDTO));
                } catch (InstanceNotFoundException e) {
                    throw new ValidationException("Label " + labelDTO.code
                            + " not found.");
                }
            }
View Full Code Here


        Label label2 = givenStoredLabel();

        OrderLineGroup orderLineGroup = createValidOrderLineGroup();
        orderLineGroup.addLabel(label1);
        OrderElement child = orderLineGroup.getChildren().get(0);
        child.addLabel(label2);
        orderElementDAO.save(orderLineGroup);

        List<OrderElement> orderELements = orderElementDAO
                .findByLabelsAndCriteria(Collections.singleton(label1), null);
        assertEquals(1, orderELements.size());
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.