public void prepare() {
int id = getSequence();
++id;
ThreadResource tr = ThreadResource.getInstance();
Random r = tr.getRandom();
StringBuilder buffer = tr.getBuffer();
fields[0] = RandomUtil.randomText(r, 15, 20); //title
fields[1] = RandomUtil.randomText(r, 50, 495); // description
fields[2] = UserName.getUserName(r.random(1, ScaleFactors.users));
fields[3] = "e" + id + ".jpg"; // imageurl
fields[4] = "e" + id + "t.jpg"; // imagethumburl
fields[5] = "e" + id + "l.pdf"; //literatureurl
fields[6] = RandomUtil.randomPhone(r, buffer); //phone
fields[7] = RandomUtil.randomTimeZone(r); // timezone
DateFormat dateFormat = tr.getDateFormat(); // eventtimestamp
String eventDate = dateFormat.format(
r.makeDateInInterval(BASE_DATE, 0, 540));
int eventHr = r.random(7, 21);
String eventMin = EVT_MINUTES[r.random(0, 3)]; // eventtimestamp
fields[8] = String.format("%s %02d:%s:00",
eventDate, eventHr, eventMin);
fields[9] = eventDate; // eventdate
fields[10] = RandomUtil.randomText(r, 50, 90); //summary
createdTimestamp = r.makeDateInInterval( //createdtimestamp
BASE_DATE, -540, 0);
ifields[0] = r.random(1, ScaleFactors.users); // addressId
// The rest is initialized to 0 anyway, leave it that way.
}