Esempio n. 1
0
 /** Set the JDBC DataSource to be used by this DAO. */
 @Autowired
 public final void setDataSource(DataSource dataSource) {
   if (this.jdbcTemplate == null || dataSource != this.jdbcTemplate.getDataSource()) {
     this.jdbcTemplate = createJdbcTemplate(dataSource);
     initTemplateConfig();
   }
 }
Esempio n. 2
0
 /** Set the JdbcTemplate for this DAO explicitly, as an alternative to specifying a DataSource. */
 @Autowired
 public final void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
   this.jdbcTemplate = jdbcTemplate;
   initTemplateConfig();
 }