📄 dictdatacache.java
字号:
/*
* Created on 2004-3-25
*
*/
package com.esimple.service.dict;
import java.util.*;
/**
* @author steven
*
*/
public class DictDataCache {
private HashMap dictType = new HashMap();
private HashMap dictContent = new HashMap();
public String getDictType(String typeID){
if( typeID == null )return null;
return dictType.get(typeID).toString();
}
public HashMap getDictContent(String typeID){
if( typeID == null )return null;
return (HashMap)dictContent.get(typeID);
}
public String getDictContent(String typeID,String contentID){
if( typeID == null ||contentID ==null )return null;
Object content = dictContent.get(typeID);
if( content == null ) return null;
return ((HashMap)content).get(contentID).toString();
}
public void addDictType(String typeID,String typeName){
if( typeID != null && typeName != null )
dictType.put(typeID,typeName);
}
public void addDictContent(String typeID, String contentID,String contentName){
if( typeID == null || contentID == null || contentName == null ) return;
if( dictType.get(typeID) == null )return;
if( dictContent.get(typeID) == null ){
dictContent.put(typeID,new HashMap());
}
((HashMap)dictContent.get(typeID)).put(contentID,contentName);
}
public void clear(){
dictType = new HashMap();
dictContent = new HashMap();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -