for (int id_order = 1; id_order <= TpccTools.NB_MAX_ORDER; id_order++) {
int o_ol_cnt = TpccTools.aleaNumber(5, 15);
Date aDate = new Date((new java.util.Date()).getTime());
Order newOrder = new Order(id_order,
id_district,
id_wharehouse,
generateSeqAlea(0, TpccTools.NB_MAX_CUSTOMER - 1),
aDate,
(id_order < TpccTools.LIMIT_ORDER) ? TpccTools.aleaNumber(1, 10) : 0,
o_ol_cnt,
1);
boolean successful = false;
while (!successful) {
try {
newOrder.store(basicCache);
successful = true;
} catch (Throwable e) {
log.warn("Storing new order failed", e);
}
}