List<IpBlacklist> blacklists = getJdbcOperations().query(query.getSql(),
query.getParameters(), new IpBlacklistRowMapper(){
@Override
public IpBlacklist mapRow(ResultSet rs, int rowNum)
throws SQLException {
IpBlacklist blacklist = super.mapRow(rs, rowNum);
blacklist.setTotalCustomers(rs.getInt("total"));
return blacklist;
}
}.setTargetClass(IpBlacklist.class));
return blacklists;
}