Package org.springframework.jdbc.core.simple

Examples of org.springframework.jdbc.core.simple.SimpleJdbcTemplate.queryForList()


      Map<String, Object> paramMap = new HashMap<String, Object>();
      for (ParameterContext pc : this.getSqlArguments()) {
        paramMap.put(pc.getArgument().getText(), instance.get(pc.getVariable().getName()));
      }
     
      List<Map<String, Object>> results = simpleJdbcTemplate.queryForList(actualSqlStatement, paramMap);
     
      for (ParameterContext pc : this.getResultSet()) {
        ProcessVariableValue pvv = new ProcessVariableValue();
       
        for (Map<String, Object> resultMap : results) {
View Full Code Here


        // Only refresh the data every minute as needed
        long now = System.currentTimeMillis();
        if (lastLoaded + CACHE_TIME < now) {
            SimpleJdbcTemplate jt = new SimpleJdbcTemplate(ds);
            data = jt.queryForList("SELECT * FROM sample_table");
            lastLoaded = now;
        }
        return SUCCESS;
    }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.