1.

RowMapper implementation which can automatically map a row to a new instance of the specified class.a) BeanPropertyRowMapperb) BeanPropertyRowc) All of the mentionedd) None of the mentionedAnswer: aExplanation: Note that the specified class must be a top-level class and must have a default or no-argument constructor. It first instantiates this class and then maps each column value to a property by matching their names.12. Method which provides list of maps.a) queryForList()b) updatec) query()d) all of the mentionedAnswer: aExplanation: Without the help of RowMapper, you can still call the queryForList() method and pass in a SQL statement. The returned result will be a list of maps. Each map stores a row of the result set with the column names as the keys.13. Spring JDBC framework offers a convenient class, to simplify your DAO implementation.a) org.springframework.jdbc.core.supportb) org.springframework.jdbc.core.support.JdbcDaoSupportc) all of the mentionedd) none of the mentionedAnswer: bExplanation: Spring JDBC framework offers a convenient class, org.springframework.jdbc.core.support.JdbcDaoSupport, to simplify your DAO implementation. This class declares a jdbcTemplate property, which can be injected from the IoC container or created automatically from a data source. 14. The org.springframework.jdbc.core.support.JdbcDaoSupport class has a setDataSource() method and a setJdbcTemplate() method.a) Trueb) FalseAnswer: aExplanation: Your DAO class can extend this class to have these methods inherited. 15. Method to retrieve the JDBC template.

A. BeanPropertyRowMapperb) BeanPropertyRowc) All of the mentionedd) None of the mentionedAnswer: aExplanation: Note that the specified class must be a top-level class and must have a default or no-argument constructor. It first instantiates this class and then maps each column value to a property by matching their names.12. Method which provides list of maps.a) queryForList()b) updatec) query()d) all of the mentionedAnswer: aExplanation: Without the help of RowMapper, you can still call the queryForList() method and pass in a SQL statement. The returned result will be a list of maps. Each map stores a row of the result set with the column names as the keys.13. Spring JDBC framework offers a convenient class, to simplify your DAO implementation.a) org.springframework.jdbc.core.supportb) org.springframework.jdbc.core.support.JdbcDaoSupportc) all of the mentionedd) none of the mentionedAnswer: bExplanation: Spring JDBC framework offers a convenient class, org.springframework.jdbc.core.support.JdbcDaoSupport, to simplify your DAO implementation. This class declares a jdbcTemplate property, which can be injected from the IoC container or created automatically from a data source. 14. The org.springframework.jdbc.core.support.JdbcDaoSupport class has a setDataSource() method and a setJdbcTemplate() method.a) Trueb) FalseAnswer: aExplanation: Your DAO class can extend this class to have these methods inherited. 15. Method to retrieve the JDBC template.a) setJdbcTemplate()
B. BeanPropertyRowc) All of the mentionedd) None of the mentionedAnswer: aExplanation: Note that the specified class must be a top-level class and must have a default or no-argument constructor. It first instantiates this class and then maps each column value to a property by matching their names.12. Method which provides list of maps.a) queryForList()b) updatec) query()d) all of the mentionedAnswer: aExplanation: Without the help of RowMapper, you can still call the queryForList() method and pass in a SQL statement. The returned result will be a list of maps. Each map stores a row of the result set with the column names as the keys.13. Spring JDBC framework offers a convenient class, to simplify your DAO implementation.a) org.springframework.jdbc.core.supportb) org.springframework.jdbc.core.support.JdbcDaoSupportc) all of the mentionedd) none of the mentionedAnswer: bExplanation: Spring JDBC framework offers a convenient class, org.springframework.jdbc.core.support.JdbcDaoSupport, to simplify your DAO implementation. This class declares a jdbcTemplate property, which can be injected from the IoC container or created automatically from a data source. 14. The org.springframework.jdbc.core.support.JdbcDaoSupport class has a setDataSource() method and a setJdbcTemplate() method.a) Trueb) FalseAnswer: aExplanation: Your DAO class can extend this class to have these methods inherited. 15. Method to retrieve the JDBC template.a) setJdbcTemplate()b) getTemplate()
C. All of the mentionedd) None of the mentionedAnswer: aExplanation: Note that the specified class must be a top-level class and must have a default or no-argument constructor. It first instantiates this class and then maps each column value to a property by matching their names.12. Method which provides list of maps.a) queryForList()b) updatec) query()d) all of the mentionedAnswer: aExplanation: Without the help of RowMapper, you can still call the queryForList() method and pass in a SQL statement. The returned result will be a list of maps. Each map stores a row of the result set with the column names as the keys.13. Spring JDBC framework offers a convenient class, to simplify your DAO implementation.a) org.springframework.jdbc.core.supportb) org.springframework.jdbc.core.support.JdbcDaoSupportc) all of the mentionedd) none of the mentionedAnswer: bExplanation: Spring JDBC framework offers a convenient class, org.springframework.jdbc.core.support.JdbcDaoSupport, to simplify your DAO implementation. This class declares a jdbcTemplate property, which can be injected from the IoC container or created automatically from a data source. 14. The org.springframework.jdbc.core.support.JdbcDaoSupport class has a setDataSource() method and a setJdbcTemplate() method.a) Trueb) FalseAnswer: aExplanation: Your DAO class can extend this class to have these methods inherited. 15. Method to retrieve the JDBC template.a) setJdbcTemplate()b) getTemplate()c) getJdbc()
D. None of the mentionedAnswer: aExplanation: Note that the specified class must be a top-level class and must have a default or no-argument constructor. It first instantiates this class and then maps each column value to a property by matching their names.12. Method which provides list of maps.a) queryForList()b) updatec) query()d) all of the mentionedAnswer: aExplanation: Without the help of RowMapper, you can still call the queryForList() method and pass in a SQL statement. The returned result will be a list of maps. Each map stores a row of the result set with the column names as the keys.13. Spring JDBC framework offers a convenient class, to simplify your DAO implementation.a) org.springframework.jdbc.core.supportb) org.springframework.jdbc.core.support.JdbcDaoSupportc) all of the mentionedd) none of the mentionedAnswer: bExplanation: Spring JDBC framework offers a convenient class, org.springframework.jdbc.core.support.JdbcDaoSupport, to simplify your DAO implementation. This class declares a jdbcTemplate property, which can be injected from the IoC container or created automatically from a data source. 14. The org.springframework.jdbc.core.support.JdbcDaoSupport class has a setDataSource() method and a setJdbcTemplate() method.a) Trueb) FalseAnswer: aExplanation: Your DAO class can extend this class to have these methods inherited. 15. Method to retrieve the JDBC template.a) setJdbcTemplate()b) getTemplate()c) getJdbc()d) getJdbcTemplate()Answer: dExplanation: In your DAO methods, you can simply call the getJdbcTemplate() method to retrieve the JDBC template. You also have to delete the dataSource and jdbcTemplate properties, as well as their setter methods, from your DAO class, because they have already been inherited. Again, for simplicity’s sake, only the change to the insert() method is shown.Sanfoundry Global Education & Learning Series – Java Spring.To practice all areas of Java Spring, here is complete set of 1000+ Multiple Choice Questions and Answers.Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | PinterestYoutube | LinkedIn | Instagram | Facebook | Twitter | Pinterest« Prev - Spring Questions and Answers – Problems with Direct JDBC» Next - Spring Questions and Answers – Using the Simple JDBC Template and Handling Exceptions
Answer» B. BeanPropertyRowc) All of the mentionedd) None of the mentionedAnswer: aExplanation: Note that the specified class must be a top-level class and must have a default or no-argument constructor. It first instantiates this class and then maps each column value to a property by matching their names.12. Method which provides list of maps.a) queryForList()b) updatec) query()d) all of the mentionedAnswer: aExplanation: Without the help of RowMapper, you can still call the queryForList() method and pass in a SQL statement. The returned result will be a list of maps. Each map stores a row of the result set with the column names as the keys.13. Spring JDBC framework offers a convenient class, to simplify your DAO implementation.a) org.springframework.jdbc.core.supportb) org.springframework.jdbc.core.support.JdbcDaoSupportc) all of the mentionedd) none of the mentionedAnswer: bExplanation: Spring JDBC framework offers a convenient class, org.springframework.jdbc.core.support.JdbcDaoSupport, to simplify your DAO implementation. This class declares a jdbcTemplate property, which can be injected from the IoC container or created automatically from a data source. 14. The org.springframework.jdbc.core.support.JdbcDaoSupport class has a setDataSource() method and a setJdbcTemplate() method.a) Trueb) FalseAnswer: aExplanation: Your DAO class can extend this class to have these methods inherited. 15. Method to retrieve the JDBC template.a) setJdbcTemplate()b) getTemplate()


Discussion

No Comment Found

Related MCQs