@Component public class UserParamCache extends Object
| 构造器和说明 |
|---|
UserParamCache() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
delete(Object userId)
根据用户ID,删除所有个性化参数
|
void |
delete(Object userId,
String name)
根据用户ID和Key,删除所有个性化参数
|
Boolean |
getBoolean(Object userId,
String key)
获取Boolean类型的值
|
String |
getDate(Object userId,
String key)
获取日期
|
String |
getDateTime(Object userId,
String key)
获取日期时间
|
Double |
getDouble(Object userId,
String key)
获取Double类型的值
|
Float |
getFloat(Object userId,
String key)
获取Float类型的值
|
Integer |
getInt(Object userId,
String key)
获取Integer类型的值
|
com.alibaba.fastjson.JSONObject |
getJson(Object userId,
String key)
获取JSONObject类型的值
|
List<Object> |
getList(Object userId,
String key)
获取List类型的值
|
Map<String,Object> |
getMap(Object userId,
String key)
获取Map类型的值
|
Object |
getObject(Object userId,
String name)
获取Object类型的值
|
String |
getString(Object userId,
String key)
获取String类型的值
|
void |
reloadAll()
初始化缓存
|
void |
update(Object userId,
String name,
Object value)
更新缓存
|
public Object getObject(Object userId, String name) throws SQLException
userId - 用户IDname - 参数名SQLExceptionpublic String getString(Object userId, String key) throws SQLException
userId - 用户IDkey - 参数名SQLExceptionpublic Integer getInt(Object userId, String key) throws SQLException
userId - 用户IDkey - 参数名SQLExceptionpublic Double getDouble(Object userId, String key) throws SQLException
userId - 用户IDkey - 参数名SQLExceptionpublic Float getFloat(Object userId, String key) throws SQLException
userId - 用户IDkey - 参数名SQLExceptionpublic String getDate(Object userId, String key) throws SQLException
userId - 用户IDkey - 参数名SQLExceptionpublic String getDateTime(Object userId, String key) throws SQLException
userId - 用户IDkey - 参数名SQLExceptionpublic com.alibaba.fastjson.JSONObject getJson(Object userId, String key) throws SQLException
userId - 用户IDkey - 参数名SQLExceptionpublic Map<String,Object> getMap(Object userId, String key) throws SQLException
userId - 用户IDkey - 参数名SQLExceptionpublic List<Object> getList(Object userId, String key) throws SQLException
userId - 用户IDkey - 参数名SQLExceptionpublic Boolean getBoolean(Object userId, String key) throws SQLException
userId - 用户IDkey - 参数名SQLExceptionpublic void delete(Object userId) throws SQLException
userId - 用户IDSQLExceptionpublic void delete(Object userId, String name) throws SQLException
userId - 用户IDname - 参数名SQLExceptionpublic void reloadAll()
throws SQLException
SQLExceptionpublic void update(Object userId, String name, Object value) throws SQLException
userId - name - 参数名value - 参数值SQLException - 参数描述Copyright © 2025. All rights reserved.