private static OrderedProductDetails toOrderProductDetails(Vector<Object> o) { Object[] row = o.toArray(); OrderedProductDetails details = new OrderedProductDetails(); details.setProductCode(row[0].toString()); details.setQuantity(Integer.valueOf(row[1].toString())); return details; }
private static Object[] toRow(OrderedProductDetails details) { return new Object[] { details.getProductCode(), details.getQuantity(), details.getPrice(), details.getTotal() }; }