Code example for NamedParameterJdbcTemplate

Methods: query

0
            return readAll(); 
        } 
        String sql = "SELECT LIMIT :start :limit * FROM Document ORDER BY created_date ASC"; 
        BeanPropertySqlParameterSource source = new BeanPropertySqlParameterSource(criteria); 
 
        List<Document> documents = this.namedJdbcTemplate.query(sql, source, new DocumentRowMapper()); 
        log.debug(documents.size() + " Documents returned using criteria: " + criteria); 
 
        return documents; 
    } 
}