Skip to content

Instantly share code, notes, and snippets.

@bicabone
Created October 5, 2018 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bicabone/8722d72301798bece20e649b6c1dfcda to your computer and use it in GitHub Desktop.
Save bicabone/8722d72301798bece20e649b6c1dfcda to your computer and use it in GitHub Desktop.
public Collection<T> getT(int x, int y, Instant a, Instant b) {
log.info("E: getT({}, {}, {}, {})", x, y, a, b);
Collection<PositionScore> output;
int size = 0;
try {
output = jdbcTemplate.query(SELECT + WHERE,
new MapSqlParameterSource()
.addValue("x", x)
.addValue("y", y)
.addValue("a", new Timestamp(a.toEpochMilli()))
.addValue("b", new Timestamp(b.toEpochMilli())),
(rs, i) -> fromSql(rs)
);
size = output.size();
return output;
} finally {
log.info("L: getT(.,.,.,).size() = {}", size);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment