package CoreFS.SA06;

import java.io.Serializable;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import CoreFS.SA01.CoreException;

/**
 * @desc :数据传递的容器 包括前台请求的数据，请求的服务ID，返回执行的结果
 * @create:091128
 * @modify:091128
 * @author sunjiawang
 * 
 */
public class CoreReturnObject implements Serializable {
	private static final long serialVersionUID = -986600646149636690L;
	protected static final  Log log = LogFactory.getLog(CoreReturnObject.class);
	public Exception exception;
	public String clientIp="";
	public String getClientIp() {
		return clientIp;
	}

	public void setClientIp(String clientIp) {
		this.clientIp = clientIp;
	}

	public String getV_errMsg() {
		return v_errMsg;
	}

	public void setV_errMsg(String msg) {
		v_errMsg = msg;
		try {
			throw new Exception(msg);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public Integer getV_errCode() {
		return v_errCode;
	}

	public void setV_errCode(Integer code) {
		v_errCode = code;
	}

	private String v_errMsg = "";
	private Integer v_errCode = 0;
	private Object result;
	private String v_formkey="";

	public String getV_formkey() {
		return v_formkey;
	}

	public void setV_formkey(String v_formkey) {
		this.v_formkey = v_formkey;
	}

	public Object getResult() {
		return result;
	}

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

	public Exception getException() {
		return exception;
	}

	public void setException(Exception exception) {
		this.exception = exception;
	}

	public CoreReturnObject SetErrInfo(String msg) {
		CoreReturnObject cro = new CoreReturnObject();
		cro.setResult(null);
		cro.setV_errCode(-1);
		cro.setV_errMsg(msg);
		log.error(msg);
		return cro;

	}
}