in lucene/src/main/java/org/apache/geode_examples/lucene/Example.java [72:99]
public static void insertValues(Map<Integer, EmployeeData> region) {
// insert values into the region
String[] firstNames = "Alex,Bertie,Kris,Dale,Frankie,Jamie,Morgan,Pat,Ricky,Taylor".split(",");
String[] lastNames = "Able,Bell,Call,Driver,Forth,Jive,Minnow,Puts,Reliable,Tack".split(",");
String[] contactNames = "Jack,John,Tom,William,Nick,Jason,Daniel,Sue,Mary,Mark".split(",");
int salaries[] = new int[] {60000, 80000, 75000, 90000, 100000};
int hours[] = new int[] {40, 40, 40, 30, 20};
int emplNumber = 10000;
for (int index = 0; index < firstNames.length; index++) {
emplNumber = emplNumber + index;
Integer key = emplNumber;
String email = firstNames[index] + "." + lastNames[index] + "@example.com";
// Generating random number between 0 and 100000 for salary
int salary = salaries[index % 5];
int hoursPerWeek = hours[index % 5];
ArrayList<Contact> contacts = new ArrayList();
Contact contact1 = new Contact(contactNames[index] + " Jr",
new String[] {"50353" + (30000 + index), "50363" + (30000 + index)});
Contact contact2 = new Contact(contactNames[index],
new String[] {"50354" + (30000 + index), "50364" + (30000 + index)});
contacts.add(contact1);
contacts.add(contact2);
EmployeeData val = new EmployeeData(firstNames[index], lastNames[index], emplNumber, email,
salary, hoursPerWeek, contacts);
region.put(key, val);
}
}