Package org.company.recordshop.domain

Examples of org.company.recordshop.domain.Order


    Customer partBusinessObject = null;
    if (part != null) {
      partBusinessObject = customerServiceModelDomainService
          .readCustomer(part.getId());
    }
    Order mainBusinessObject = customerServiceModelDomainService
        .readOrder(whole.getId());
    customerServiceModelDomainService.setCustomer(mainBusinessObject,
        partBusinessObject);
    return;
  }
View Full Code Here


      } else {

        /* An existing object to be updated */
        if (target.getFromOrders(element.getId()) == null) {
          // Element is not in target yet, read it from the store and add to target
          Order original = orderDao.retrieve(element.getId());
          Order updated = orderNumberAndDateDtoTranslator.fromDto(
              element, original, translated);
          target.addToOrders(updated);
        } else {
          // Element is in target already, use this object. No need to add to the collection
          orderNumberAndDateDtoTranslator.fromDto(element, target
View Full Code Here

    Assert.notNull(source, "argument [source] may not be null");
    Assert.isNull(source.getId(),
        "Can not translate a dto with existing id to a new domain object. Dto: "
            + source);
    Order target = new Order(source.getOrderNumber()

    );
    return fromDto(source, target, translated);

  }
View Full Code Here

    private OrderLine orderline03 = new OrderLine(3, "orderline03");

    @Test
    public void cascadeDelete4Composite() {

        Order savedOrder = orderDao.retrieve(orderDao.add(order));
        orderLineDao.add(orderline01);
        orderLineDao.add(orderline02);
        orderLineDao.add(orderline03);

        order.addToOrderLines(orderline01);
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public OrderDto readOrderAsOrderDto(Long id) {
    Order result = orderServiceModelDomainService.readOrder(id);
    return (result == null) ? null : orderDtoTranslator.toDto(result);
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public OrderNumberAndDateDto readOrderAsOrderNumberAndDateDto(Long id) {
    Order result = orderServiceModelDomainService.readOrder(id);
    return (result == null) ? null : orderNumberAndDateDtoTranslator
        .toDto(result);
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public OrderWithOrderLinesDto readOrderAsOrderWithOrderLinesDto(Long id) {
    Order result = orderServiceModelDomainService.readOrder(id);
    return (result == null) ? null : orderWithOrderLinesDtoTranslator
        .toDto(result);
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public void updateOrder(OrderDto object) {
    Order domainObject = orderServiceModelDomainService.readOrder(object
        .getId());
    orderDtoTranslator.fromDto(object, domainObject);
    orderServiceModelDomainService.updateOrder(domainObject);
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public void updateOrder(OrderNumberAndDateDto object) {
    Order domainObject = orderServiceModelDomainService.readOrder(object
        .getId());
    orderNumberAndDateDtoTranslator.fromDto(object, domainObject);
    orderServiceModelDomainService.updateOrder(domainObject);
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public void updateOrder(OrderWithOrderLinesDto object) {
    Order domainObject = orderServiceModelDomainService.readOrder(object
        .getId());
    orderWithOrderLinesDtoTranslator.fromDto(object, domainObject);
    orderServiceModelDomainService.updateOrder(domainObject);
  }
View Full Code Here

TOP

Related Classes of org.company.recordshop.domain.Order

Copyright © 2018 www.massapicom. 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.