示例#1
0
 protected String queryString(String query) throws IOException {
   if (USECACHE) {
     if (cache == null) cache = new Hashtable();
     Object r = cache.get(query);
     if (r != null) return (String) r;
     String r1 = queryString1(query);
     cache.put(query, r1);
     return r1;
   } else {
     return queryString1(query);
   }
 }
示例#2
0
 protected Vector /* of TTPNode */ queryPNodes(String query) throws IOException {
   if (USECACHE) {
     if (cache == null) cache = new Hashtable();
     Object r = cache.get(query);
     if (r != null) return (Vector) r;
     Vector r1 = queryPNodes1(query);
     cache.put(query, r1);
     return r1;
   } else {
     return queryPNodes1(query);
   }
 }
示例#3
0
 protected boolean queryBoolean(String query) throws IOException {
   if (USECACHE) {
     if (cache == null) cache = new Hashtable();
     Object r = cache.get(query);
     if (r != null) return ((Boolean) r).booleanValue();
     Boolean r1 = queryBoolean1(query);
     cache.put(query, r1);
     return r1.booleanValue();
   } else {
     return queryBoolean1(query).booleanValue();
   }
 }