Last active
June 13, 2018 14:10
-
-
Save sapanparikh18/f142304b2c7664c530e98757bac80c78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Reviewanswer getAnswer(int questionId) { | |
String sql = "select * from answers where questionid=:questionId"; | |
Map<String, Object> params = new HashMap<>(); | |
Reviewanswer answer = new Reviewanswer(); | |
params.put("questionId",questionId); | |
try { | |
answer = namedParameterJdbcTemplate.queryForObject(sql,params,Reviewanswer.class); | |
}catch (DataAccessException ex){ | |
Logger.getLogger(this.getClass().getName()).log(Level.ALL,ex.getLocalizedMessage()); | |
} | |
return answer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment