sysorgcache.java
来自「管理公司合同」· Java 代码 · 共 71 行
JAVA
71 行
/*
* 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 + =
减小字号Ctrl + -
显示快捷键?