Package com.yummynoodlebar.persistence.domain

Examples of com.yummynoodlebar.persistence.domain.MenuItem


    return new AllMenuItemsEvent(details);
  }

  @Override
  public MenuItemDetailsEvent requestMenuItemDetails(RequestMenuItemDetailsEvent requestMenuItemDetailsEvent) {
    MenuItem item = menuItemRepository.findById(requestMenuItemDetailsEvent.getId());

    if (item == null) {
      return MenuItemDetailsEvent.notFound(requestMenuItemDetailsEvent.getId());
    }

    return new MenuItemDetailsEvent(
        requestMenuItemDetailsEvent.getId(),
        item.toStatusDetails());
  }
View Full Code Here


        item.toStatusDetails());
  }

  @Override
  public MenuItemDetailsEvent createMenuItem(CreateMenuItemEvent createMenuItemEvent) {
    MenuItem item = menuItemRepository.save(
        MenuItem.fromStatusDetails(createMenuItemEvent.getDetails()));

    return new MenuItemDetailsEvent(
        item.getId(),
        item.toStatusDetails());
  }
View Full Code Here

    items.put("YM3", menuItem("YM3", new BigDecimal("3.99"), 13, "Low cal Yummy Noodles"));
    return items;
  }

  private MenuItem menuItem(String id, BigDecimal cost, int minutesToPrepare, String name) {
    MenuItem item = new MenuItem();
    item.setId(id);
    item.setCost(cost);
    item.setMinutesToPrepare(minutesToPrepare);
    item.setName(name);
    return item;
  }
View Full Code Here

    items.put("YM3", menuItem("YM3", new BigDecimal("3.99"), 13, "Low cal Yummy Noodles"));
    return items;
  }

  private MenuItem menuItem(String id, BigDecimal cost, int minutesToPrepare, String name) {
    MenuItem item = new MenuItem();
    item.setId(id);
    item.setCost(cost);
    item.setMinutesToPrepare(minutesToPrepare);
    item.setName(name);
    return item;
  }
View Full Code Here

    items.put("YM3", menuItem("YM3", new BigDecimal("3.99"), 13, "Low cal Yummy Noodles"));
    return items;
  }

  private MenuItem menuItem(String id, BigDecimal cost, int minutesToPrepare, String name) {
    MenuItem item = new MenuItem();
    item.setId(id);
    item.setCost(cost);
    item.setMinutesToPrepare(minutesToPrepare);
    item.setName(name);
    return item;
  }
View Full Code Here

TOP

Related Classes of com.yummynoodlebar.persistence.domain.MenuItem

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.