mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-16 09:11:02 +00:00
added the competitor list field to RaceCell and its implementation.
adapted the serializer and deserializer appropriately
This commit is contained in:
1 parent
72e5f53f39
commit
31b6b49a97
7 files changed
+132
-79
No files matched your search
+18
-15
@@ -1,15 +1,18 @@
|
||||
package com.sap.sailing.domain.base.racegroup;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
import com.sap.sailing.domain.racelog.RaceLog;
|
||||
|
||||
/**
|
||||
* A "race".
|
||||
* <p>
|
||||
*
|
||||
* Because this and all other {@link RaceGroup} interfaces are used for communication with the Android applications a
|
||||
* {@link RaceCell} carries its {@link RaceLog} for easy serialization and transmission of race information.
|
||||
*/
|
||||
public interface RaceCell extends Named {
|
||||
RaceLog getRaceLog();
|
||||
}
|
||||
package com.sap.sailing.domain.base.racegroup;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
import com.sap.sailing.domain.racelog.RaceLog;
|
||||
|
||||
/**
|
||||
* A "race".
|
||||
* <p>
|
||||
*
|
||||
* Because this and all other {@link RaceGroup} interfaces are used for communication with the Android applications a
|
||||
* {@link RaceCell} carries its {@link RaceLog} for easy serialization and transmission of race information.
|
||||
*/
|
||||
public interface RaceCell extends Named {
|
||||
RaceLog getRaceLog();
|
||||
|
||||
Iterable<Competitor> getCompetitors();
|
||||
}
|
||||
+9
-1
@@ -1,5 +1,6 @@
|
||||
package com.sap.sailing.domain.base.racegroup.impl;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceCell;
|
||||
import com.sap.sailing.domain.common.impl.NamedImpl;
|
||||
import com.sap.sailing.domain.racelog.RaceLog;
|
||||
@@ -8,10 +9,12 @@ public class RaceCellImpl extends NamedImpl implements RaceCell {
|
||||
private static final long serialVersionUID = 971598420407273594L;
|
||||
|
||||
private RaceLog raceLog;
|
||||
private Iterable<Competitor> competitors;
|
||||
|
||||
public RaceCellImpl(String name, RaceLog raceLog) {
|
||||
public RaceCellImpl(String name, RaceLog raceLog, Iterable<Competitor> competitors) {
|
||||
super(name);
|
||||
this.raceLog = raceLog;
|
||||
this.competitors = competitors;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -19,4 +22,9 @@ public class RaceCellImpl extends NamedImpl implements RaceCell {
|
||||
return raceLog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Competitor> getCompetitors() {
|
||||
return competitors;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user