📄 sysorgcache.java
字号:
/*
* Created on 2006-10-19 17:12:59
*
* By SinoBest
* Copyright hnisi.com.cn, 2005-2006, All rights reserved.
*/
package cn.com.juneng.system.common.cache;
import java.util.List;
import cn.com.juneng.system.common.SpringBeanFactory;
import cn.com.juneng.system.service.SysOrgService;
/**
* @author yehailong
*
*/
public class SysOrgCache extends AbstractCache {
private static SysOrgCache instance;
private SysOrgCache() {
}
public static SysOrgCache getInstance() {
if (instance == null) {
instance = new SysOrgCache();
}
return instance;
}
protected String getTableName() {
return "sys_org";
}
protected List loadDBData() throws Exception {
SysOrgService orgService = (SysOrgService) SpringBeanFactory
.getBean("sysOrgService");
return orgService.getSysOrgDAO().getHibernateTemplate().find(
"from SysOrgVOImpl");
}
private static List cacheData;
protected List loadCacheData() {
return cacheData;
}
protected void synchronzeCacheData() throws Exception {
cacheData = loadDBData();
}
//同步检查时间:秒
protected int getCheckTime() {
return 60;
}
/**
* 返回系统所有机构列表
*
* @return
* @throws Exception
*/
public List getAllSysOrg() throws Exception {
return this.getCacheData();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -