Package com.yummynoodlebar.core.domain

Examples of com.yummynoodlebar.core.domain.Order


    if (!orderDetailsEvent.isEntityFound()) {
      return OrderDeletedEvent.notFound(deleteOrderEvent.getKey());
    }

    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

TOP

Related Classes of com.yummynoodlebar.core.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.