return "truncate table ADDRESS";
}
public void prepare() {
ThreadResource tr = ThreadResource.getInstance();
Random r = tr.getRandom();
StringBuilder buffer = tr.getBuffer();
buffer.append(r.makeNString(1, 5)).append(' '); // number
RandomUtil.randomName(r, buffer, 1, 11); // street
String streetExt = STREETEXTS[r.random(0, STREETEXTS.length - 1)];
if (streetExt.length() > 0)
buffer.append(' ').append(streetExt);
fields[0] = buffer.toString();
int toggle = r.random(0, 1); // street2
if (toggle > 0)
fields[1] = r.makeCString(5, 20);
fields[2] = r.makeCString(4, 14); // city
fields[3] = r.makeCString(2, 2).toUpperCase(); // state
fields[4] = r.makeNString(5, 5); // zip
toggle = r.random(0, 1);
if (toggle == 0) {
fields[5] = "USA";
} else {
buffer.setLength(0);
fields[5] = RandomUtil.randomName(r, buffer, 6, 16).toString();
}
// Latitude, we do not get addresses in polar circles. So the limit
fields[6] = String.format("%.6f", r.drandom(-66.560556d, 66.560556d));
fields[7] = String.format("%.6f", r.drandom(-179.999999d, 180d));
}