Renamed generateId() method to setId() method in the Event class