public OrderRecord(Table<? extends PaymentMethod> payments) {
this.payments = payments;
}
public Order hydrate(ResultSet rs) throws SQLException {
Order order = new Order(new OrderNumber(number.get(rs)));
if (payment.get(rs) != Types.NULL)
order.paidUsing(payments.hydrate(rs));
idOf(order).set(id.get(rs));
return order;
}