【发布时间】:2014-05-16 14:35:59
【问题描述】:
我想用这个方法返回一个布尔值:
public Boolean isSizeOk(String transactionId){
String sqlQuery = "SELECT true FROM customer_pool WHERE id = "+ transactionID + " AND level = 13)";
//The next line is the problem.
//If I am returning a Boolean List, I can write
List <Boolean> sizeResult = jdbcTemplate.queryForList(sqlQuery, Boolean.class, transactionId);
//But since I only want a boolean value, what will the statement be?
Boolean sizeResult = jdbcTemplate......?
return sizeResult;
}
请帮助。谢谢。
【问题讨论】:
-
非常感谢...您的解决方案都是正确的。我现在不知道将正确答案授予谁:)。感谢您的帮助!
标签: boolean return jdbctemplate