public List<VoucherHistory> getHistories(Integer voucherId,
int start, int limit) {
String sql = "SELECT vh.order_id, o.firstname, o.lastname, vh.amount, vh.date_added FROM "+
quoteTable("voucher_history")+" vh LEFT JOIN "+quoteTable("order")+
" 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)