List<Category> catList = getJdbcOperations().query(query.getSql(),
query.getParameters(), new CategoryRowMapper(){
@Override
public Category mapRow(ResultSet rs, int rowNum)
throws SQLException {
Category cat = super.mapRow(rs, rowNum);
cat.setName(getPath(cat.getId(), separator));
return cat;
}
}.setTargetClass(Category.class));
Collections.sort(catList, new Comparator<Category>() {