Package org.enhydra.jdbc.util

Examples of org.enhydra.jdbc.util.RequestCache


    }
  }

        public void close() throws SQLException {
         if (statement != null) {
              RequestCache uc = RequestCache.getInstance();
        if (! uc.isInCache(theQuery)) {
      statement.close();
        }
    }
  }
View Full Code Here


    try {

        // si dans le cache, on renvoie le resultset
        //        log.debug("CoreStatement:executeQuery");
        // sinon on cree le statement
        RequestCache uc = RequestCache.getInstance();
        ResultSet rset = null;
        theQuery = s;
        if (uc.isInCache(s)) {
      rset = (ResultSet) (uc.getResult(s));
      rset.beforeFirst();
      inCache = true;
        } else {
      String rsql = uc.getSqlPattern(s);
      rset = statement.executeQuery(s);
         
      if (rsql != null) {
          // we need to cache the ResultSet object
          uc.setResult(rsql, rset);
          uc.setLink(s, rsql);
          inCache = true;
      } else {
          // sql request is not a cacheable request :-(
          uc.setLink(s, "null");
      }
        }
       
        return rset;
View Full Code Here

TOP

Related Classes of org.enhydra.jdbc.util.RequestCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.