// Path: order-context-parent/eventbus-contract/src/main/java/se/citerus/cqrs/bookstore/ordercontext/order/OrderId.java
// public class OrderId extends GenericId {
// 
//   public OrderId(@JsonProperty("id") String id) {
//     super(id);
//   }
// 
//   public static OrderId randomId() {
//     return new OrderId(UUID.randomUUID().toString());
//   }
// 
// }
// 
// Path: order-context-parent/eventbus-contract/src/main/java/se/citerus/cqrs/bookstore/ordercontext/order/OrderStatus.java
// public enum OrderStatus {
// 
//   ACTIVATED, PLACED
// 
// }
// 
// Path: order-context-parent/order-query/src/main/java/se/citerus/cqrs/bookstore/ordercontext/query/Projection.java
// public class Projection {
// 
//   @Override
//   public boolean equals(Object o) {
//     return EqualsBuilder.reflectionEquals(this, o);
//   }
// 
//   @Override
//   public int hashCode() {
//     return HashCodeBuilder.reflectionHashCode(this);
//   }
// 
//   @Override
//   public String toString() {
//     return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
//   }
// 
// }


import com.fasterxml.jackson.annotation.JsonProperty;
import se.citerus.cqrs.bookstore.ordercontext.order.OrderId;
import se.citerus.cqrs.bookstore.ordercontext.order.OrderStatus;
import se.citerus.cqrs.bookstore.ordercontext.query.Projection;
import java.util.ArrayList;
import java.util.List;
package se.citerus.cqrs.bookstore.ordercontext.query.orderlist;



public class OrderProjection extends Projection {

  private final OrderId orderId;
  private final long orderPlacedTimestamp;
  private final long orderAmount;
  private final String customerName;
  private final List<OrderLineProjection> orderLines;
  private OrderStatus status;

  public OrderProjection(@JsonProperty("orderId") OrderId orderId,
                         @JsonProperty("orderPlacedTimestamp") long orderPlacedTimestamp,
                         @JsonProperty("customerName") String customerName,
                         @JsonProperty("orderAmount") long orderAmount,
                         @JsonProperty("orderLines") List<OrderLineProjection> orderLines,
                         @JsonProperty("status") OrderStatus status) {
    this.orderId = orderId;
    this.orderPlacedTimestamp = orderPlacedTimestamp;
    this.customerName = customerName;
    this.orderAmount = orderAmount;
    this.orderLines = new ArrayList<>(orderLines);
    this.status = status;
  }

  public List<OrderLineProjection> getOrderLines() {
    return orderLines;
  }

// Path: order-context-parent/eventbus-contract/src/main/java/se/citerus/cqrs/bookstore/ordercontext/order/OrderId.java
// public class OrderId extends GenericId {
// 
//   public OrderId(@JsonProperty("id") String id) {
//     super(id);
//   }
// 
//   public static OrderId randomId() {
//     return new OrderId(UUID.randomUUID().toString());
//   }
// 
// }
// 
// Path: order-context-parent/eventbus-contract/src/main/java/se/citerus/cqrs/bookstore/ordercontext/order/OrderStatus.java
// public enum OrderStatus {
// 
//   ACTIVATED, PLACED
// 
// }
// 
// Path: order-context-parent/order-query/src/main/java/se/citerus/cqrs/bookstore/ordercontext/query/Projection.java
// public class Projection {
// 
//   @Override
//   public boolean equals(Object o) {
//     return EqualsBuilder.reflectionEquals(this, o);
//   }
// 
//   @Override
//   public int hashCode() {
//     return HashCodeBuilder.reflectionHashCode(this);
//   }
// 
//   @Override
//   public String toString() {
//     return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
//   }
// 
// }


// Path: order-context-parent/order-query/src/main/java/se/citerus/cqrs/bookstore/ordercontext/query/orderlist/OrderProjection.java
import com.fasterxml.jackson.annotation.JsonProperty;
import se.citerus.cqrs.bookstore.ordercontext.order.OrderId;
import se.citerus.cqrs.bookstore.ordercontext.order.OrderStatus;
import se.citerus.cqrs.bookstore.ordercontext.query.Projection;
import java.util.ArrayList;
import java.util.List;

package se.citerus.cqrs.bookstore.ordercontext.query.orderlist;



public class OrderProjection extends Projection {

  private final OrderId orderId;
  private final long orderPlacedTimestamp;
  private final long orderAmount;
  private final String customerName;
  private final List<OrderLineProjection> orderLines;
  private OrderStatus status;

  public OrderProjection(@JsonProperty("orderId") OrderId orderId,
                         @JsonProperty("orderPlacedTimestamp") long orderPlacedTimestamp,
                         @JsonProperty("customerName") String customerName,
                         @JsonProperty("orderAmount") long orderAmount,
                         @JsonProperty("orderLines") List<OrderLineProjection> orderLines,
                         @JsonProperty("status") OrderStatus status) {
    this.orderId = orderId;
    this.orderPlacedTimestamp = orderPlacedTimestamp;
    this.customerName = customerName;
    this.orderAmount = orderAmount;
    this.orderLines = new ArrayList<>(orderLines);
    this.status = status;
  }

  public List<OrderLineProjection> getOrderLines() {
    return orderLines;
  }

  public OrderId getOrderId() {