if (id_wharehouse < 0 || id_district < 0) return;
else {
log.info(" CUSTOMER " + id_wharehouse + ", " + id_district);
for (int i = 1; i <= TpccTools.NB_MAX_CUSTOMER; i++) {
Customer newCustomer = new Customer(id_wharehouse,
id_district,
i,
TpccTools.aleaChainec(8, 16),
"OE",
c_last(),
TpccTools.aleaChainec(10, 20),
TpccTools.aleaChainec(10, 20),
TpccTools.aleaChainec(10, 20),
TpccTools.aleaChainel(2, 2),
TpccTools.aleaChainen(4, 4) + TpccTools.CHAINE_5_1,
TpccTools.aleaChainen(16, 16),
new Date(System.currentTimeMillis()),
(TpccTools.aleaNumber(1, 10) == 1) ? "BC" : "GC",
500000.0, TpccTools.aleaDouble(0., 0.5, 4), -10.0, 10.0, 1, 0, TpccTools.aleaChainec(300, 500));
boolean successful = false;
while (!successful) {
try {
newCustomer.store(basicCache);
successful = true;
} catch (Throwable e) {
log.warn("Storing new customer failed", e);
}
}