private JdbcTemplate jdbcTemplate;
private NamedParameterJdbcTemplate namedJdbcTemplate;
@Autowired
public void setDataSource(DataSource ds) {
insert = new SimpleJdbcInsert(ds);
insert.setTableName("user_events");
insert.usingColumns("userid", "type", "private", "message_id", "comment_id", "message");
insertTopicUsersNotified = new SimpleJdbcInsert(ds);
insertTopicUsersNotified.setTableName("topic_users_notified");
insertTopicUsersNotified.usingColumns("topic", "userid");
jdbcTemplate = new JdbcTemplate(ds);
namedJdbcTemplate = new NamedParameterJdbcTemplate(ds);