package com.yeejoin.equipmanage.common.entity.publics;

import java.util.Map;

public class CommonResponse {

	/**
	 * 操作状态
	 */
	private String result;

	/**
	 * 数据
	 */
	private Object dataList;

	/**
	 * 返回页面传递过来的参数
	 */
	private Map<String, Object> paramMap;

	/**
	 * 操作详细信息
	 */
	private String message;

	public CommonResponse() {
		// TODO Auto-generated constructor stub
	}

	public CommonResponse(String result) {
		this.result = result;
	}

	public CommonResponse(Object dataList) {
		this.dataList = dataList;
		this.result = "";
	}

	public CommonResponse(String result, Object dataList) {
		this.dataList = dataList;
		this.result = result;
	}

	public CommonResponse(String result, String message) {
		this.result = result;
		this.message = message;
	}

	public CommonResponse(String result, Object dataList, String message) {
		this.dataList = dataList;
		this.result = result;
		this.message = message;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public Object getDataList() {
		return dataList;
	}

	public void setDataList(Object dataList) {
		this.dataList = dataList;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	/**
	 * Getter method for property <tt>paramMap</tt>.
	 * 
	 * @return property value of paramMap
	 */
	public Map<String, Object> getParamMap() {
		return paramMap;
	}

	/**
	 * Setter method for property <tt>paramMap</tt>.
	 * 
	 * @param paramMap
	 *            value to be assigned to property paramMap
	 */
	public void setParamMap(Map<String, Object> paramMap) {
		this.paramMap = paramMap;
	}
	 public Boolean isSuccess(){
	        return "SUCCESS".equals(getResult());
	    }
}
