1 22 23 package org.webdocwf.util.loader; 24 25 import java.util.*; 26 27 33 public class RelationsCache { 34 35 private Hashtable relationCacheValue = new Hashtable(); 36 private Hashtable relationCacheType = new Hashtable(); 37 38 41 public RelationsCache() { 42 } 43 44 49 public void setRelationsCacheValue(String key, Object obj){ 50 relationCacheValue.put(key,obj); 51 } 52 53 58 public void setRelationsCacheType(String key, String type){ 59 relationCacheType.put(key,type); 60 } 61 62 67 public Object getRelationsCacheValue(String key) { 68 Object obj = relationCacheValue.get(key); 69 if (obj == null) 70 return null; 71 else 72 return obj; 73 } 74 75 80 public String getRelationsCachType(String key){ 81 String type=relationCacheType.get(key).toString(); 82 return type; 83 } 84 85 89 public void resetRelationsCache(){ 90 relationCacheValue.clear(); 91 relationCacheType.clear(); 92 } 93 94 } | Popular Tags |