package com.changhong.autoform.core.tool; import javax.sql.DataSource; /** * 线程存储区的key * @author WangYX * */ public class Keys { private String key; private Class clazz; private T defaultValue; public Keys(String key, Class clazz) { super(); this.key = key; this.clazz = clazz; } public Keys(String key, Class clazz, T defaultValue) { super(); this.key = key; this.clazz = clazz; this.defaultValue = defaultValue; } public static Keys getKeys(String key, Class clazz){ return new Keys<>(key, clazz); } public static Keys getKeys(String key, Class clazz, T defaultValue){ return new Keys<>(key, clazz, defaultValue); } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public Class getClazz() { return clazz; } public void setClazz(Class clazz) { this.clazz = clazz; } public T getDefaultValue() { return defaultValue; } public void setDefaultValue(T defaultValue) { this.defaultValue = defaultValue; } /** * 数据源 */ public static final Keys DATA_SOURCE = getKeys("DATA_SOURCE", DataSource.class); }