// NewItem
// ----------------------------------------------------------------
protected boolean executeNewItem(NewItem proc) throws SQLException {
Timestamp benchmarkTimes[] = this.getTimestampParameterArray();
UserId sellerId = profile.getRandomSellerId(this.getId());
ItemId itemId = profile.getNextItemId(sellerId);
String name = profile.rng.astring(6, 32);
String description = profile.rng.astring(50, 255);
long categoryId = profile.getRandomCategoryId();
Double initial_price = (double) profile.randomInitialPrice.nextInt();
String attributes = profile.rng.astring(50, 255);
int numAttributes = profile.randomNumAttributes.nextInt();
List<GlobalAttributeValueId> gavList = new ArrayList<GlobalAttributeValueId>(numAttributes);
for (int i = 0; i < numAttributes; i++) {
GlobalAttributeValueId gav_id = profile.getRandomGlobalAttributeValue();
if (!gavList.contains(gav_id)) gavList.add(gav_id);
} // FOR
long[] gag_ids = new long[gavList.size()];
long[] gav_ids = new long[gavList.size()];
for (int i = 0, cnt = gag_ids.length; i < cnt; i++) {
GlobalAttributeValueId gav_id = gavList.get(i);
gag_ids[i] = gav_id.getGlobalAttributeGroup().encode();
gav_ids[i] = gav_id.encode();
} // FOR
int numImages = profile.randomNumImages.nextInt();
String[] images = new String[numImages];
for (int i = 0; i < numImages; i++) {
images[i] = profile.rng.astring(20, 100);
} // FOR
long duration = profile.randomDuration.nextInt();
Object results[] = null;
try {
long itemIdEncoded = itemId.encode();
results = proc.run(conn, benchmarkTimes, itemIdEncoded, sellerId.encode(),
categoryId, name, description,
duration, initial_price, attributes,
gag_ids, gav_ids, images);
} catch (DuplicateItemIdException ex) {
profile.seller_item_cnt.set(sellerId, ex.getItemCount());