There are some queries used by a DAO layer that is implemented in JDBC Template
String longQuery = ".....";
public List<AnObject> findObjectsBySomething(Something s) {
return getJdbcTemplate().queryForObjects(longQuery, myRowMapper, s);
}
longQuery is going to frequently change, but I don't want to have to manage it right in the source code. How do you go about handling this? I need jdbc template source code, and at least the basics of setting it up in mysql.
Other requirements:
- Cannot be a View, I already tried this and my query is too complicated (derived tables)
- Needs to query across other mysql databases on the same server
- Needs to return a list of Ids, which could many, several thousand possibly