package com.doctor.esper.tutorial;

/**
 * Creating a Java Event Class
 * 
 * Java classes are a good choice for representing events, however Map-based or XML event representations can also be good choices depending on
 * your
 * architectural requirements.
 * 
 * A sample Java class that represents an order event is shown below. A simple plain-old Java class that provides getter-methods for access to
 * event
 * properties works best:
 * 
 * @author doctor
 *
 * @time 2015年5月28日 下午3:59:02
 */
public class OrderEvent {
	private String itemName;
	private double price;

	public OrderEvent(String itemName, double price) {
		this.itemName = itemName;
		this.price = price;
	}

	public String getItemName() {
		return itemName;
	}

	public double getPrice() {
		return price;
	}

}

@@ -29,16 +29,51 @@
 orial;%0A%0A
+import com.alibaba.fastjson.JSON;%0A%0A
 /**%0A * C
@@ -811,10 +811,86 @@
 ce;%0A%09%7D%0A%0A
+%09@Override%0A%09public String toString() %7B%0A%09%09return JSON.toJSONString(this);%0A%09%7D%0A
 %7D%0A

add toString() method