package io.oasp.gastronomy.restaurant.salesmanagement.logic.api.to;

import io.oasp.gastronomy.restaurant.general.common.api.to.SearchCriteriaTo;
import io.oasp.gastronomy.restaurant.salesmanagement.common.api.datatype.OrderPositionState;

/**
 * This is the {@link SearchCriteriaTo search criteria} {@link net.sf.mmm.util.transferobject.api.TransferObject TO}
 * used to find {@link io.oasp.gastronomy.restaurant.salesmanagement.common.api.OrderPosition}s.
 *
 * @author hohwille
 */
public class OrderPositionSearchCriteriaTo extends SearchCriteriaTo {

  /** UID for serialization. */
  private static final long serialVersionUID = 1L;

  private OrderPositionState state;

  private Long orderId;

  private Long cookId;

  private boolean mealOrSideDish;

  /**
   * The constructor.
   */
  public OrderPositionSearchCriteriaTo() {

    super();
  }

  /**
   * @return orderPositionState
   */
  public OrderPositionState getState() {

    return this.state;
  }

  /**
   * @param orderPositionState the orderPositionState to set
   */
  public void setState(OrderPositionState orderPositionState) {

    this.state = orderPositionState;
  }

  /**
   * @return the {@link io.oasp.gastronomy.restaurant.salesmanagement.common.api.OrderPosition#getOrderId() order ID} of
   *         the {@link io.oasp.gastronomy.restaurant.salesmanagement.common.api.OrderPosition}s to find or
   *         <code>null</code> if no such criteria shall be added.
   */
  public Long getOrderId() {

    return this.orderId;
  }

  /**
   * @param orderId the orderId to set
   */
  public void setOrderId(Long orderId) {

    this.orderId = orderId;
  }

  /**
   * @return the {@link io.oasp.gastronomy.restaurant.salesmanagement.common.api.OrderPosition#getCookId() cook ID} of
   *         the {@link io.oasp.gastronomy.restaurant.salesmanagement.common.api.OrderPosition}s to find or
   *         <code>null</code> if no such criteria shall be added.
   */
  public Long getCookId() {

    return this.cookId;
  }

  /**
   * @param cookId the cookId to set
   */
  public void setCookId(Long cookId) {

    this.cookId = cookId;
  }

  /**
   * @return <code>true</code> if only {@link io.oasp.gastronomy.restaurant.salesmanagement.common.api.OrderPosition}s
   *         shall be found that have a meal or a side-dish associated (exclude drink only positions),
   *         <code>false</code> if no such criteria shall be added.
   */
  public boolean isMealOrSideDish() {

    return this.mealOrSideDish;
  }

  /**
   * @param mealOrSideDish the mealOrSideDish to set
   */
  public void setMealOrSideDish(boolean mealOrSideDish) {

    this.mealOrSideDish = mealOrSideDish;
  }

}

@@ -231,16 +231,108 @@
 onState;
+%0Aimport io.oasp.gastronomy.restaurant.salesmanagement.common.api.datatype.ProductOrderState;
 %0A%0A/**%0A *
@@ -762,16 +762,57 @@
 state;%0A%0A
+  private ProductOrderState drinkState;%0A%0A
   privat
@@ -1231,24 +1231,24 @@
 onState) %7B%0A%0A
-
     this.sta
@@ -1269,32 +1269,391 @@
 tionState;%0A  %7D%0A%0A
+  /**%0A   * @return drinkState of the %7B@link io.oasp.gastronomy.restaurant.salesmanagement.common.api.OrderPosition %7D%0A   */%0A  public ProductOrderState getDrinkState() %7B%0A%0A    return this.drinkState;%0A  %7D%0A%0A  /**%0A   * @param drinkState the drinkState to set%0A   */%0A  public void setDrinkState(ProductOrderState drinkState) %7B%0A%0A    this.drinkState = drinkState;%0A  %7D%0A%0A
   /**%0A   * @retu

create separate state for drink of OrderPosition