A. Generic Maps: JdbcTemplate can return results as a List<Map<String, Object>>, where each Map represents a row with column names as keys.
B. Simple types (int, long, String, etc): JdbcTemplate can return single values directly, such as an int, long, or String, especially useful for aggregate functions or queries expected to return a single value.
D. User defined types: JdbcTemplate can map query results to custom user-defined types (JavaBeans) using a RowMapper or BeanPropertyRowMapper.
Generic Maps (Map<String, Object>) is one of the return types of the JdbcTemplate. To return Properties, you need to create a custom RowMapper to map the ResultSet to a Property. It doesn't support it by default.
why not A instead of E. Generic Maps are more common query than properties in JdbcTemplate.
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Evoila_TrainingMaterial
4 months ago3cef6cd
6 months, 3 weeks agoAzuni
1 year, 3 months agoAzuni
1 year, 3 months agorhuanca
1 year, 8 months ago