Some of the queryFor* methods available in JdbcTemplate are useful for simple sql statements that perform CRUD operations.
Querying for Date
String sql = "SELECT create_date FROM customer WHERE customer_id = ?";
int storeId = jdbcTemplate.queryForObject(sql, java.util.Date.class, customerId);
Querying for Integer
String sql = "SELECT store_id FROM customer WHERE customer_id = ?";
int storeId = jdbcTemplate.queryForObject(sql, Integer.class, customerId);
OR
String sql = "SELECT store_id FROM customer WHERE customer_id = ?";
int storeId = jdbcTemplate.queryForInt(sql, customerId); //Deprecated in spring-jdbc 4
Querying for String
String sql = "SELECT first_Name FROM customer WHERE customer_id = ?";
String firstName = jdbcTemplate.queryForObject(sql, String.class, customerId);
Querying for List
String sql = "SELECT first_Name FROM customer WHERE store_id = ?";
List<String> firstNameList = jdbcTemplate.queryForList(sql, String.class, storeId);