Examples of OrderLineDTO


Examples of org.company.recordshop.service.dto.OrderLineDto

        }
        return order;
    }

    private OrderLineDto createOrderLine(int i, String productNumber) {
        OrderLineDto line = new OrderLineDto();
        line.setDescription("empty");
        line.setLineNumber(i);
        FullProductDto product = new FullProductDto();
        product.setProductNumber(productNumber);
        product.setPrice(15.0F);
        product.setOrderable(true);
        line.setProduct(product);
        return line;
    }
View Full Code Here

Examples of org.company.recordshop.service.dto.OrderLineDto

        productDto4.setPrice(99.99f);
        productDto4.setOrderable(true);

        OrderWithOrderLinesDto order1 = new OrderWithOrderLinesDto();
        order1.setOrderNumber("ORDER-1");
        OrderLineDto orderLineDto1 = new OrderLineDto();
        orderLineDto1.setLineNumber(1);
        orderLineDto1.setDescription("ORDER-1-ORDERLINE-1");
        orderLineDto1.setProduct(productDto1);
        OrderLineDto orderLineDto2 = new OrderLineDto();
        orderLineDto2.setLineNumber(2);
        orderLineDto2.setDescription("ORDER-1-ORDERLINE-2");
        orderLineDto2.setProduct(productDto2);
        order1.addToOrderLines(orderLineDto1);
        order1.addToOrderLines(orderLineDto2);

        OrderWithOrderLinesDto order2 = new OrderWithOrderLinesDto();
        order2.setOrderNumber("ORDER-2");
        OrderLineDto orderLineDto3 = new OrderLineDto();
        orderLineDto3.setLineNumber(1);
        orderLineDto3.setDescription("ORDER-2-ORDERLINE-1");
        orderLineDto3.setProduct(productDto3);
        OrderLineDto orderLineDto4 = new OrderLineDto();
        orderLineDto4.setLineNumber(2);
        orderLineDto4.setDescription("ORDER-2-ORDERLINE-2");
        orderLineDto4.setProduct(productDto4);
        order2.addToOrderLines(orderLineDto3);
        order2.addToOrderLines(orderLineDto4);

        customerDto.addToOrders(order1);
        customerDto.addToOrders(order2);
View Full Code Here

Examples of org.company.recordshop.service.dto.OrderLineDto

      final Map<Object, Object> translated) {
    if (translated.containsKey((source))) {
      return (OrderLineDto) translated.get(source);
    }
    Assert.notNull(source, "argument [source] may not be null");
    OrderLineDto result = new OrderLineDto(source.getId(), source
        .getVersion());
    result.setLineNumber(source.getLineNumber());
    result.setQuantity(source.getQuantity());
    result.setDescription(source.getDescription());

    translated.put(source, result);

    if (source.getProduct() != null) {
      result.setProduct(fullProductDtoTranslator.toDto(source
          .getProduct(), translated));
    }

    return result;
  }
View Full Code Here

Examples of org.company.recordshop.service.dto.OrderLineDto

                .readCustomerAsCustomerWithOrdersAndOrderLines(customerServiceModelService
                        .createCustomer(customerDto));
        flush();

        for (OrderWithOrderLinesDto orderDto : createdCustomer.getOrders()) {
            OrderLineDto toBeRemoved = null;
            for (OrderLineDto orderLineDto : orderDto.getOrderLines()) {
                if (orderLineDto.getLineNumber() == 1) {
                    toBeRemoved = orderLineDto;
                }
            }
View Full Code Here

Examples of org.company.recordshop.service.dto.OrderLineDto

                .readCustomerAsCustomerWithOrdersAndOrderLines(customerId);
        flush();
        // createdCustomer =
        // customerServiceModelService.readCustomerAsCustomerWithOrdersAndOrderLines(createdCustomer.getId());

        OrderLineDto orderLineDtoNew = new OrderLineDto();
        orderLineDtoNew.setLineNumber(3);
        orderLineDtoNew.setDescription("ORDER-NEW-ORDERLINE-3");

        for (OrderWithOrderLinesDto orderDto : createdCustomer.getOrders()) {
            orderDto.addToOrderLines(orderLineDtoNew);
        }
View Full Code Here

Examples of org.company.recordshop.service.dto.OrderLineDto

        }
        return order;
    }

    private OrderLineDto createOrderLine(int i, String productNumber) {
        OrderLineDto line = new OrderLineDto();
        line.setDescription("empty");
        line.setLineNumber(i);
        FullProductDto product = new FullProductDto();
        product.setProductNumber(productNumber);
        product.setPrice(15.0F);
        product.setOrderable(true);
        line.setProduct(product);
        return line;
    }
View Full Code Here

Examples of org.company.recordshop.service.dto.OrderLineDto

        // JOS: The above is incorrect (just not to break the build)
        // The below should be run as a test and shows the error.
        FullProductDto fullProduct = customerService.readProductAsFullProductDto(createdP001
                .getId());
        OrderLineDto orderLine = new OrderLineDto();
        orderLine.setProduct(fullProduct);
        orderLine.setLineNumber(1);
        orderLine.setDescription("an orderline");
        OrderWithOrderLinesDto order = new OrderWithOrderLinesDto();
        order.addToOrderLines(orderLine);
        order.setOrderNumber("aap");
        orderService.createOrder(order);
View Full Code Here

Examples of org.libreplan.ws.common.api.OrderLineDTO

    @Autowired
    private SessionFactory sessionFactory;

    private OrderLineDTO givenBasicOrderLineDTO(String orderLineCode) {
        OrderLineDTO orderLineDTO = new OrderLineDTO();
        orderLineDTO.name = "Test";
        orderLineDTO.code = orderLineCode;
        orderLineDTO.initDate = DateConverter
                .toXMLGregorianCalendar(new Date());
View Full Code Here

Examples of org.libreplan.ws.common.api.OrderLineDTO

        OrderDTO orderDTO = new OrderDTO();
        orderDTO.name = "Order name " + UUID.randomUUID().toString();
        orderDTO.code = "order-code " + UUID.randomUUID().toString();
        orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());

        OrderLineDTO orderLineDTO = new OrderLineDTO();
        orderLineDTO.code = "order-line-code " + UUID.randomUUID().toString();
        orderDTO.children.add(orderLineDTO);

        OrderListDTO orderListDTO = createOrderListDTO(orderDTO);
        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = orderElementService
View Full Code Here

Examples of org.libreplan.ws.common.api.OrderLineDTO

        OrderDTO orderDTO = new OrderDTO();
        orderDTO.name = "Order name " + UUID.randomUUID().toString();
        orderDTO.code = "order-code " + UUID.randomUUID().toString();
        orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());

        OrderLineDTO orderLineDTO = new OrderLineDTO();
        orderDTO.children.add(orderLineDTO);

        OrderListDTO orderListDTO = createOrderListDTO(orderDTO);
        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = orderElementService
                .addOrders(orderListDTO).instanceConstraintViolationsList;
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.