mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-11 06:40:53 +00:00
event's dominant boat class is not determined by the dominant boat class of the event (if there
are only two, none is dominant) but by the event's competitors' dominant boat class
This commit is contained in:
1 parent
07bded4764
commit
a00ed444ad
1 file changed
+4
-1
+4
-1
@@ -310,7 +310,10 @@ public class DomainFactoryImpl implements DomainFactory {
|
||||
// This means that currently it is permissible to assume that we'll get at most one
|
||||
// boat class per TracTrac event. Generally, however, we have to assume that
|
||||
// one TracTrac event may map to multiple domain Event objects with one BoatClass each
|
||||
Collection<CompetitorClass> competitorClassList = event.getCompetitorClassList();
|
||||
Collection<CompetitorClass> competitorClassList = new ArrayList<CompetitorClass>();
|
||||
for (com.tractrac.clientmodule.Competitor c : event.getCompetitorList()) {
|
||||
competitorClassList.add(c.getCompetitorClass());
|
||||
}
|
||||
BoatClass boatClass = getDominantBoatClass(competitorClassList);
|
||||
Pair<String, String> key = new Pair<String, String>(event.getName(), boatClass==null?null:boatClass.getName());
|
||||
Event result = eventCache.get(key);
|
||||
|
||||
Reference in new issue
Block a user