package com.xt.hb.gis.common;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * 后台向前台传递的结果集<br>
 * <p>
 * 包含结果和消息两部分
 * <p>
 * 此对象仅用于controller层，其他层不要使用
 * 
 * @author masn
 * 
 */
public class BusinessContext implements Serializable {

	private static final long serialVersionUID = 6019646588968724189L;

	// 默认结果
	private Object result;

	// 如果有多个结果，使用此属性
	private Map<String, Object> bussAttribute = new HashMap<String, Object>();

	public void setAttribute(String name, Object value) {
		bussAttribute.put(name, value);
	}

	public Object getAttribute(String name) {
		return bussAttribute.get(name);
	}

	public Map<String, Object> getBussAttribute() {
		return bussAttribute;
	}

	public void setBussAttribute(Map<String, Object> bussAttribute) {
		this.bussAttribute = bussAttribute;
	}

	public Object getResult() {
		return result;
	}

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