I bet $10 there is no SimpleJdbcTemplate method which returns null if no rows match and returns an object if one row matches.