include race id in denoteForTrackingEvent -> allows choosing custom stable ID

This commit is contained in:
Fredrik Teschke committed 2014-04-24 07:18:37 +02:00
1 parent 70ae0e9543
commit ec15b110c8
16 files changed
+45 -26

No files matched your search

@@ -1262,7 +1262,8 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
Serializable id, Integer passId, List<Competitor> competitors, DBObject dbObject) {
String raceName = (String) dbObject.get(FieldNames.RACE_NAME.name());
BoatClass boatClass = baseDomainFactory.getOrCreateBoatClass((String) dbObject.get(FieldNames.BOAT_CLASS_NAME.name()));
return raceLogEventFactory.createDenoteForTrackingEvent(createdAt, author, logicalTimePoint, id, passId, raceName, boatClass);
Serializable raceId = (Serializable) dbObject.get(FieldNames.RACE_ID.name());
return raceLogEventFactory.createDenoteForTrackingEvent(createdAt, author, logicalTimePoint, id, passId, raceName, boatClass, raceId);
}
private RaceLogEvent loadRaceLogStartEvent(TimePoint createdAt, RaceLogEventAuthor author, TimePoint logicalTimePoint,
@@ -844,6 +844,7 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
result.put(FieldNames.RACE_LOG_EVENT_CLASS.name(), DenoteForTrackingEvent.class.getSimpleName());
result.put(FieldNames.RACE_NAME.name(), event.getRaceName());
result.put(FieldNames.BOAT_CLASS_NAME.name(), event.getBoatClass().getName());
result.put(FieldNames.RACE_ID.name(), event.getRaceId());
return result;
}