* and display it.
*/
private void getOrderStatusForCustomer(Display display, Object displayData,
boolean byName, Customer customer) throws Exception
{
Order order = new Order();
order.setWarehouse(customer.getWarehouse());
order.setDistrict(customer.getDistrict());
// Find the most recent order number for this customer
osLastOrderNumber.setShort(1, customer.getWarehouse());
osLastOrderNumber.setShort(2, customer.getDistrict());
osLastOrderNumber.setInt(3, customer.getId());
ResultSet rs = osLastOrderNumber.executeQuery();
rs.next();
order.setId(rs.getInt("LAST_ORDER"));
reset(osLastOrderNumber);
// Details for the order.
osOrderDetails.setShort(1, customer.getWarehouse());
osOrderDetails.setShort(2, customer.getDistrict());
osOrderDetails.setInt(3, order.getId());
rs = osOrderDetails.executeQuery();
rs.next();
order.setEntry_d(rs.getTimestamp("O_ENTRY_D"));
order.setCarrier_id((Integer) rs.getObject("O_CARRIER_ID"));
order.setOl_cnt(rs.getInt("O_OL_CNT"));
rs.close();
OrderLine[] lineItems = new OrderLine[order.getOl_cnt()];
osOrderLineItems.setShort(1, order.getWarehouse());
osOrderLineItems.setShort(2, order.getDistrict());
osOrderLineItems.setInt(3, order.getId());
rs = osOrderLineItems.executeQuery();
int oli = 0;
while (rs.next())
{
OrderLine ol = new OrderLine();