📄 userinfocache.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: UserInfoCache.java
package com.laoer.bbscs.sys;
import com.laoer.bbscs.bean.UserInfo;
import com.laoer.bbscs.business.IUserInfoService;
// Referenced classes of package com.laoer.bbscs.sys:
// CacheManager, ICache
public class UserInfoCache
{
private IUserInfoService userInfoService;
public UserInfoCache()
{
}
public IUserInfoService getUserInfoService()
{
return userInfoService;
}
public void setUserInfoService(IUserInfoService userInfoService)
{
this.userInfoService = userInfoService;
}
public void putUserInfoInCache(UserInfo ui)
{
CacheManager.getCache(1).add(String.valueOf(ui.getId()), ui);
}
public UserInfo getUserInfoFromCache(long id)
{
UserInfo ui = (UserInfo)CacheManager.getCache(1).get(String.valueOf(id));
if(ui == null)
{
ui = getUserInfoService().findUserInfoById(new Long(id));
CacheManager.getCache(1).add(String.valueOf(id), ui);
}
return ui;
}
public void removeFromCache(long id)
{
CacheManager.getCache(1).remove(String.valueOf(id));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -