Examples of toOrderDetails()


Examples of com.yummynoodlebar.core.domain.Order.toOrderDetails()

    order.addStatus(new OrderStatus(new Date(), "Order Created"));

    order = ordersRepository.save(order);

    return new OrderCreatedEvent(order.getKey(), order.toOrderDetails());
  }

  @Override
  public AllOrdersEvent requestAllOrders(RequestAllOrdersEvent requestAllCurrentOrdersEvent) {
    List<OrderDetails> generatedDetails = new ArrayList<OrderDetails>();
View Full Code Here

Examples of com.yummynoodlebar.core.domain.Order.toOrderDetails()

      return OrderDetailsEvent.notFound(requestOrderDetailsEvent.getKey());
    }

    return new OrderDetailsEvent(
            requestOrderDetailsEvent.getKey(),
            order.toOrderDetails());
  }

  @Override
  public OrderUpdatedEvent setOrderPayment(SetOrderPaymentEvent setOrderPaymentEvent) {
    return null//To change body of implemented methods use File | Settings | File Templates.
View Full Code Here

Examples of com.yummynoodlebar.core.domain.Order.toOrderDetails()

    if (order == null) {
      return OrderDeletedEvent.notFound(deleteOrderEvent.getKey());
    }

    OrderDetails details = order.toOrderDetails();

    //TODOCUMENT This contains some specific domain logic, not exposed to the outside world, and not part of the
    //persistence rules.

    if (!order.canBeDeleted()) {
View Full Code Here

Examples of com.yummynoodlebar.core.domain.Order.toOrderDetails()

    }

    Order order = Order.fromOrderDetails(orderDetailsEvent.getOrderDetails());

    if (!order.canBeDeleted()) {
      return OrderDeletedEvent.deletionForbidden(deleteOrderEvent.getKey(), order.toOrderDetails());
    }

    ordersPersistenceService.deleteOrder(deleteOrderEvent);

    return new OrderDeletedEvent(deleteOrderEvent.getKey(), order.toOrderDetails());
View Full Code Here

Examples of com.yummynoodlebar.core.domain.Order.toOrderDetails()

      return OrderDeletedEvent.deletionForbidden(deleteOrderEvent.getKey(), order.toOrderDetails());
    }

    ordersPersistenceService.deleteOrder(deleteOrderEvent);

    return new OrderDeletedEvent(deleteOrderEvent.getKey(), order.toOrderDetails());
  }

  @Override
  public OrderStatusEvent requestOrderStatus(RequestOrderStatusEvent requestOrderDetailsEvent) {
    return ordersPersistenceService.requestOrderStatus(requestOrderDetailsEvent);
View Full Code Here

Examples of com.yummynoodlebar.persistence.domain.Order.toOrderDetails()

  public OrderCreatedEvent createOrder(CreateOrderEvent createOrderEvent) {
    Order order = Order.fromOrderDetails(createOrderEvent.getDetails());

    order = orderRepository.save(order);

    return new OrderCreatedEvent(order.getKey(), order.toOrderDetails());
  }

  @Override
  public AllOrdersEvent requestAllOrders(RequestAllOrdersEvent requestAllCurrentOrdersEvent) {
    List<OrderDetails> generatedDetails = new ArrayList<OrderDetails>();
View Full Code Here

Examples of com.yummynoodlebar.persistence.domain.Order.toOrderDetails()

      return OrderDetailsEvent.notFound(requestOrderDetailsEvent.getKey());
    }

    return new OrderDetailsEvent(
            requestOrderDetailsEvent.getKey(),
            order.toOrderDetails());
  }

  @Override
  public OrderUpdatedEvent setOrderPayment(SetOrderPaymentEvent setOrderPaymentEvent) {
    Order order = orderRepository.findById(setOrderPaymentEvent.getKey());
View Full Code Here

Examples of com.yummynoodlebar.persistence.domain.Order.toOrderDetails()

      return OrderUpdatedEvent.notFound(setOrderPaymentEvent.getKey());
    }

    //TODO, handling payment details...

    return new OrderUpdatedEvent(order.getKey(), order.toOrderDetails());
  }

  @Override
  public OrderDeletedEvent deleteOrder(DeleteOrderEvent deleteOrderEvent) {
View Full Code Here

Examples of com.yummynoodlebar.persistence.domain.Order.toOrderDetails()

      return OrderDeletedEvent.notFound(deleteOrderEvent.getKey());
    }

    orderRepository.delete(deleteOrderEvent.getKey());

    return new OrderDeletedEvent(deleteOrderEvent.getKey(), order.toOrderDetails());
  }

  @Override
  public OrderStatusEvent requestOrderStatus(RequestOrderStatusEvent requestOrderDetailsEvent) {
    Order order = orderRepository.findById(requestOrderDetailsEvent.getKey());
View Full Code Here

Examples of com.yummynoodlebar.persistence.domain.Order.toOrderDetails()

  public OrderCreatedEvent createOrder(CreateOrderEvent createOrderEvent) {
    Order order = Order.fromOrderDetails(createOrderEvent.getDetails());

    order = orderRepository.save(order);

    return new OrderCreatedEvent(order.getKey(), order.toOrderDetails());
  }

  @Override
  public AllOrdersEvent requestAllOrders(RequestAllOrdersEvent requestAllCurrentOrdersEvent) {
    List<OrderDetails> generatedDetails = new ArrayList<OrderDetails>();
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.