//printing events
System.out.println("Event: " + theEvent.getTitle() + " Time: "
+ theEvent.getDate());
for (int j = 0; j < persons.size(); j++) {
//printing persons in each event
Person thePerson = (Person) persons.get(j);
System.out.println("Person: " + thePerson.getFirstname()
+ " " + thePerson.getLastname());
}
}
} else if (args[0].equals("addpersontoevent")) {
Long eventId = mgr.createAndStoreEvent("My Event", new Date());
Long personId = mgr.createAndStorePerson("Foo", "Bar");