package com.chinaitop.depot.intelligent.utils;

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


/**
 * 
 * @author hf
 * 
 * @description 数据策略（数据权限控制使用）
 * 
 * 
 */
public class DataPolicyEngine {
	//log信息输出对象
	protected static final Log log = LogFactory.getLog(DataPolicyEngine.class); 

	//本地线程，用于存储线程公共对象
	private static ThreadLocal threadLocalSession = new ThreadLocal();
	
	
	/**
	 * @description 获取本地执行线程
	 *
	 * @return ThreadLocal 
	 * 
	 */
	public static ThreadLocal getThreadLocalSession() {
		return threadLocalSession;
	}
	
	/**
	 * @description 在线程内设置存储对象
	 * 
	 */
	public static void set(Object obj) {
		threadLocalSession.set(obj);

	}
	
	/**
	 * @description 获取在线程内设置存储的对象
	 * 
	 */
	public static Object get() {
		return threadLocalSession.get();

	}

	/**
	 * @description 移除在线程内设置存储的对象
	 * 
	 */
	public static void remove() {
		threadLocalSession.remove();

	}
	
	
}
