⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dictdatacache.java

📁 这是一个轻便的j2ee的web应用框架,是一个在多个项目中运用的实际框架,采用struts,hebinate,xml等技术,有丰富的tag,role,navigation,session,dictio
💻 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 + -