" o ON (vh.order_id = o.order_id) WHERE vh.voucher_id =?";
PageParam pageParam = PageParam.list(start, limit);
pageParam.addOrder("vh.date_added", "ASC");
QueryBean query = createPaginationQuery(sql, pageParam);
return getJdbcOperations().query(query.getSql(), query.getParameters(),
new VoucherHistoryRowMapper(){
@Override
public VoucherHistory mapRow(ResultSet rs, int rowNum)
throws SQLException {
VoucherHistory vh = super.mapRow(rs, rowNum);
vh.setCustomer(rs.getString("firstname")+" "+rs.getString("lastname"));