mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-16 09:11:02 +00:00
Just formatting: Changed tabs to spaces by formatting hole files (Ctrl +
I in Eclipse) that we might have touched while developing on this branch
This commit is contained in:
1 parent
ffe0f03fca
commit
d7f9bbbaf9
119 files changed
+5716
-5751
No files matched your search
+15
-15
@@ -1,15 +1,15 @@
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
import com.sap.sailing.domain.common.WithID;
|
||||
|
||||
/**
|
||||
* A named area in a sailing {@link Venue} where races take place. Usually, the areas carry names according to the NATO
|
||||
* alphabet, such as "Alpha", "Bravo" or "Charlie".
|
||||
*
|
||||
* @author Axel Uhl (D043530)
|
||||
*
|
||||
*/
|
||||
public interface CourseArea extends Named, WithID {
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
import com.sap.sailing.domain.common.WithID;
|
||||
|
||||
/**
|
||||
* A named area in a sailing {@link Venue} where races take place. Usually, the areas carry names according to the NATO
|
||||
* alphabet, such as "Alpha", "Bravo" or "Charlie".
|
||||
*
|
||||
* @author Axel Uhl (D043530)
|
||||
*
|
||||
*/
|
||||
public interface CourseArea extends Named, WithID {
|
||||
|
||||
}
|
||||
+49
-49
@@ -1,49 +1,49 @@
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
|
||||
/**
|
||||
* Base interface for courses consisting of all static information, which might be shared
|
||||
* by the server and an Android application.
|
||||
*/
|
||||
public interface CourseData extends Named {
|
||||
/**
|
||||
* Clients can safely iterate over the resulting list because it's a copy which therefore won't reflect
|
||||
* waypoint additions and removals.
|
||||
*/
|
||||
List<Leg> getLegs();
|
||||
|
||||
/**
|
||||
* @return a non-live copy of the waypoints of this course; the creation of the copy is thread safe
|
||||
*/
|
||||
Iterable<Waypoint> getWaypoints();
|
||||
|
||||
/**
|
||||
* Starts searching at position <code>start</code> in {@link #getWaypoints()} for a waypoint
|
||||
* whose {@link Waypoint#getControlPoint() control point} is identical to <code>controlPoint</code>.
|
||||
* If no such waypoint is found, <code>null</code> is returned.
|
||||
*
|
||||
* @param start 0-based
|
||||
*/
|
||||
Waypoint getWaypointForControlPoint(ControlPoint controlPoint, int start);
|
||||
|
||||
/**
|
||||
* Position of the waypoint in {@link #getWaypoints()}, 0-based, or -1
|
||||
* if waypoint doesn't exist in {@link #getWaypoints()}.
|
||||
*/
|
||||
int getIndexOfWaypoint(Waypoint waypoint);
|
||||
|
||||
Waypoint getFirstWaypoint();
|
||||
|
||||
Waypoint getLastWaypoint();
|
||||
|
||||
void addWaypoint(int zeroBasedPosition, Waypoint waypointToAdd);
|
||||
|
||||
void removeWaypoint(int zeroBasedPosition);
|
||||
|
||||
Iterable<Leg> getLegsAdjacentTo(Mark mark);
|
||||
|
||||
Leg getFirstLeg();
|
||||
}
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
|
||||
/**
|
||||
* Base interface for courses consisting of all static information, which might be shared
|
||||
* by the server and an Android application.
|
||||
*/
|
||||
public interface CourseData extends Named {
|
||||
/**
|
||||
* Clients can safely iterate over the resulting list because it's a copy which therefore won't reflect
|
||||
* waypoint additions and removals.
|
||||
*/
|
||||
List<Leg> getLegs();
|
||||
|
||||
/**
|
||||
* @return a non-live copy of the waypoints of this course; the creation of the copy is thread safe
|
||||
*/
|
||||
Iterable<Waypoint> getWaypoints();
|
||||
|
||||
/**
|
||||
* Starts searching at position <code>start</code> in {@link #getWaypoints()} for a waypoint
|
||||
* whose {@link Waypoint#getControlPoint() control point} is identical to <code>controlPoint</code>.
|
||||
* If no such waypoint is found, <code>null</code> is returned.
|
||||
*
|
||||
* @param start 0-based
|
||||
*/
|
||||
Waypoint getWaypointForControlPoint(ControlPoint controlPoint, int start);
|
||||
|
||||
/**
|
||||
* Position of the waypoint in {@link #getWaypoints()}, 0-based, or -1
|
||||
* if waypoint doesn't exist in {@link #getWaypoints()}.
|
||||
*/
|
||||
int getIndexOfWaypoint(Waypoint waypoint);
|
||||
|
||||
Waypoint getFirstWaypoint();
|
||||
|
||||
Waypoint getLastWaypoint();
|
||||
|
||||
void addWaypoint(int zeroBasedPosition, Waypoint waypointToAdd);
|
||||
|
||||
void removeWaypoint(int zeroBasedPosition);
|
||||
|
||||
Iterable<Leg> getLegsAdjacentTo(Mark mark);
|
||||
|
||||
Leg getFirstLeg();
|
||||
}
|
||||
+25
-25
@@ -1,25 +1,25 @@
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
import com.sap.sailing.domain.common.Renamable;
|
||||
import com.sap.sailing.domain.common.WithID;
|
||||
|
||||
/**
|
||||
* Base interface for an Event consisting of all static information, which might be shared
|
||||
* by the server and an Android application.
|
||||
*/
|
||||
public interface EventData extends Named, Renamable, WithID {
|
||||
|
||||
/**
|
||||
* @return a non-<code>null</code> venue for this event
|
||||
*/
|
||||
Venue getVenue();
|
||||
|
||||
String getPublicationUrl();
|
||||
|
||||
void setPublicationUrl(String publicationUrl);
|
||||
|
||||
boolean isPublic();
|
||||
|
||||
void setPublic(boolean isPublic);
|
||||
}
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
import com.sap.sailing.domain.common.Renamable;
|
||||
import com.sap.sailing.domain.common.WithID;
|
||||
|
||||
/**
|
||||
* Base interface for an Event consisting of all static information, which might be shared
|
||||
* by the server and an Android application.
|
||||
*/
|
||||
public interface EventData extends Named, Renamable, WithID {
|
||||
|
||||
/**
|
||||
* @return a non-<code>null</code> venue for this event
|
||||
*/
|
||||
Venue getVenue();
|
||||
|
||||
String getPublicationUrl();
|
||||
|
||||
void setPublicationUrl(String publicationUrl);
|
||||
|
||||
boolean isPublic();
|
||||
|
||||
void setPublic(boolean isPublic);
|
||||
}
|
||||
+20
-20
@@ -1,20 +1,20 @@
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
|
||||
/**
|
||||
* Base interface for series consisting of static information describing the Series.
|
||||
*/
|
||||
public interface SeriesData extends Named {
|
||||
|
||||
/**
|
||||
* Returns the fleets of this series, in ascending order, better fleets first.
|
||||
*/
|
||||
Iterable<? extends Fleet> getFleets();
|
||||
|
||||
/**
|
||||
* Tells whether this is the "last" / "medal" race series, usually having only one race. This may have implications
|
||||
* on the scoring scheme (usually, medal races scores are doubled and cannot be discarded).
|
||||
*/
|
||||
boolean isMedal();
|
||||
}
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
|
||||
/**
|
||||
* Base interface for series consisting of static information describing the Series.
|
||||
*/
|
||||
public interface SeriesData extends Named {
|
||||
|
||||
/**
|
||||
* Returns the fleets of this series, in ascending order, better fleets first.
|
||||
*/
|
||||
Iterable<? extends Fleet> getFleets();
|
||||
|
||||
/**
|
||||
* Tells whether this is the "last" / "medal" race series, usually having only one race. This may have implications
|
||||
* on the scoring scheme (usually, medal races scores are doubled and cannot be discarded).
|
||||
*/
|
||||
boolean isMedal();
|
||||
}
|
||||
+81
-81
@@ -1,81 +1,81 @@
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.sap.sailing.domain.common.MarkType;
|
||||
|
||||
public interface SharedDomainFactory {
|
||||
|
||||
/**
|
||||
* Looks up or, if not found, creates a {@link Nationality} object and re-uses <code>threeLetterIOCCode</code> also as the
|
||||
* nationality's name.
|
||||
*/
|
||||
Nationality getOrCreateNationality(String threeLetterIOCCode);
|
||||
|
||||
/**
|
||||
* The name will also be used as the mark's ID. If you have a unique ID, use {@link #getOrCreateMark(Serializable, String)} instead.
|
||||
*/
|
||||
Mark getOrCreateMark(String name);
|
||||
|
||||
/**
|
||||
* Since some ID types, such as {@link UUID}, cannot be serialized as objects to a GWT client, only the
|
||||
* {@link Object#toString()} representations of those IDs are serialized to the clients. When a client then requests
|
||||
* to identify a mark again, only the ID's string representation will be submitted to the server and now needs to be
|
||||
* mapped to the actual ID. This domain factory keeps a mapping of all mark ID's string representations to the
|
||||
* actual ID for all marks ever managed through any of the <code>getOrCreateMark(...)</code> overloads.
|
||||
* <p>
|
||||
*
|
||||
* This method first looks up the actual ID whose string representation is <code>toStringRepresentationOfID</code>
|
||||
* and then calls {@link #getOrCreateMark(Serializable, String)} with the result and the <code>name</code>
|
||||
* parameter, or with <code>ToStringRepresentationOfID</code> and <code>name</code> in case the string
|
||||
* representation of the ID is not known. So in the latter case, the string is used as the ID for the new mark.
|
||||
*/
|
||||
Mark getOrCreateMark(String toStringRepresentationOfID, String name);
|
||||
|
||||
Mark getOrCreateMark(Serializable id, String name);
|
||||
|
||||
/**
|
||||
* If the single mark with ID <code>id</code> already exists, it is returned. Its color may differ from <code>color</code>
|
||||
* in that case. Otherwise, a new {@link Mark} is created with <code>color</code> as its {@link Mark#getColor()}
|
||||
* and <code>shape</code> as its {@link Mark#getShape()}.
|
||||
*/
|
||||
Mark getOrCreateMark(Serializable id, String name, MarkType type, String color, String shape, String pattern);
|
||||
|
||||
/**
|
||||
* @param name also uses the name as the gate's ID; if you have a real ID, use {@link #createGate(Serializable, Mark, Mark, String)} instead
|
||||
*/
|
||||
Gate createGate(Mark left, Mark right, String name);
|
||||
|
||||
Gate createGate(Serializable id, Mark left, Mark right, String name);
|
||||
|
||||
/**
|
||||
* The waypoint created is weakly cached so that when requested again by
|
||||
* {@link #getExistingWaypointById(Waypoint)} it is found.
|
||||
*/
|
||||
Waypoint createWaypoint(ControlPoint controlPoint);
|
||||
|
||||
Waypoint getExistingWaypointById(Waypoint waypointPrototype);
|
||||
|
||||
/**
|
||||
* Atomically checks if a waypoint by an equal {@link Waypoint#getId()} as <code>waypoint</code> exists in this domain factory's
|
||||
* waypoint cache. If so, the cached waypoint is returned. Otherwise, <code>waypoint</code> is added to the cache and returned.
|
||||
*/
|
||||
Waypoint getExistingWaypointByIdOrCache(Waypoint waypoint);
|
||||
|
||||
BoatClass getOrCreateBoatClass(String name, boolean typicallyStartsUpwind);
|
||||
|
||||
/**
|
||||
* Like {@link #getOrCreateBoatClass(String, boolean)}, only that a default for <code>typicallyStartsUpwind</code> based
|
||||
* on the boat class name is calculated.
|
||||
*/
|
||||
BoatClass getOrCreateBoatClass(String name);
|
||||
|
||||
Competitor getExistingCompetitorById(Serializable competitorId);
|
||||
|
||||
Competitor createCompetitor(Serializable id, String name, Team team, Boat boat);
|
||||
|
||||
Competitor getOrCreateCompetitor(Serializable competitorId, String name, Team team, Boat boat);
|
||||
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.sap.sailing.domain.common.MarkType;
|
||||
|
||||
public interface SharedDomainFactory {
|
||||
|
||||
/**
|
||||
* Looks up or, if not found, creates a {@link Nationality} object and re-uses <code>threeLetterIOCCode</code> also as the
|
||||
* nationality's name.
|
||||
*/
|
||||
Nationality getOrCreateNationality(String threeLetterIOCCode);
|
||||
|
||||
/**
|
||||
* The name will also be used as the mark's ID. If you have a unique ID, use {@link #getOrCreateMark(Serializable, String)} instead.
|
||||
*/
|
||||
Mark getOrCreateMark(String name);
|
||||
|
||||
/**
|
||||
* Since some ID types, such as {@link UUID}, cannot be serialized as objects to a GWT client, only the
|
||||
* {@link Object#toString()} representations of those IDs are serialized to the clients. When a client then requests
|
||||
* to identify a mark again, only the ID's string representation will be submitted to the server and now needs to be
|
||||
* mapped to the actual ID. This domain factory keeps a mapping of all mark ID's string representations to the
|
||||
* actual ID for all marks ever managed through any of the <code>getOrCreateMark(...)</code> overloads.
|
||||
* <p>
|
||||
*
|
||||
* This method first looks up the actual ID whose string representation is <code>toStringRepresentationOfID</code>
|
||||
* and then calls {@link #getOrCreateMark(Serializable, String)} with the result and the <code>name</code>
|
||||
* parameter, or with <code>ToStringRepresentationOfID</code> and <code>name</code> in case the string
|
||||
* representation of the ID is not known. So in the latter case, the string is used as the ID for the new mark.
|
||||
*/
|
||||
Mark getOrCreateMark(String toStringRepresentationOfID, String name);
|
||||
|
||||
Mark getOrCreateMark(Serializable id, String name);
|
||||
|
||||
/**
|
||||
* If the single mark with ID <code>id</code> already exists, it is returned. Its color may differ from <code>color</code>
|
||||
* in that case. Otherwise, a new {@link Mark} is created with <code>color</code> as its {@link Mark#getColor()}
|
||||
* and <code>shape</code> as its {@link Mark#getShape()}.
|
||||
*/
|
||||
Mark getOrCreateMark(Serializable id, String name, MarkType type, String color, String shape, String pattern);
|
||||
|
||||
/**
|
||||
* @param name also uses the name as the gate's ID; if you have a real ID, use {@link #createGate(Serializable, Mark, Mark, String)} instead
|
||||
*/
|
||||
Gate createGate(Mark left, Mark right, String name);
|
||||
|
||||
Gate createGate(Serializable id, Mark left, Mark right, String name);
|
||||
|
||||
/**
|
||||
* The waypoint created is weakly cached so that when requested again by
|
||||
* {@link #getExistingWaypointById(Waypoint)} it is found.
|
||||
*/
|
||||
Waypoint createWaypoint(ControlPoint controlPoint);
|
||||
|
||||
Waypoint getExistingWaypointById(Waypoint waypointPrototype);
|
||||
|
||||
/**
|
||||
* Atomically checks if a waypoint by an equal {@link Waypoint#getId()} as <code>waypoint</code> exists in this domain factory's
|
||||
* waypoint cache. If so, the cached waypoint is returned. Otherwise, <code>waypoint</code> is added to the cache and returned.
|
||||
*/
|
||||
Waypoint getExistingWaypointByIdOrCache(Waypoint waypoint);
|
||||
|
||||
BoatClass getOrCreateBoatClass(String name, boolean typicallyStartsUpwind);
|
||||
|
||||
/**
|
||||
* Like {@link #getOrCreateBoatClass(String, boolean)}, only that a default for <code>typicallyStartsUpwind</code> based
|
||||
* on the boat class name is calculated.
|
||||
*/
|
||||
BoatClass getOrCreateBoatClass(String name);
|
||||
|
||||
Competitor getExistingCompetitorById(Serializable competitorId);
|
||||
|
||||
Competitor createCompetitor(Serializable id, String name, Team team, Boat boat);
|
||||
|
||||
Competitor getOrCreateCompetitor(Serializable competitorId, String name, Team team, Boat boat);
|
||||
|
||||
|
||||
}
|
||||
+17
-17
@@ -7,7 +7,7 @@ import com.sap.sailing.domain.common.impl.NamedImpl;
|
||||
|
||||
public class CourseAreaImpl extends NamedImpl implements CourseArea {
|
||||
private static final long serialVersionUID = 5912385360170509150L;
|
||||
|
||||
|
||||
private final Serializable id;
|
||||
|
||||
public CourseAreaImpl(String name, Serializable id) {
|
||||
@@ -15,20 +15,20 @@ public class CourseAreaImpl extends NamedImpl implements CourseArea {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof CourseArea) {
|
||||
CourseArea courseArea = (CourseArea) obj;
|
||||
if (this.id.equals(courseArea.getId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return super.equals(obj);
|
||||
}
|
||||
@Override
|
||||
public Serializable getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof CourseArea) {
|
||||
CourseArea courseArea = (CourseArea) obj;
|
||||
if (this.id.equals(courseArea.getId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return super.equals(obj);
|
||||
}
|
||||
}
|
||||
+76
-76
@@ -1,76 +1,76 @@
|
||||
package com.sap.sailing.domain.base.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sap.sailing.domain.base.EventData;
|
||||
import com.sap.sailing.domain.base.Venue;
|
||||
|
||||
public class EventDataImpl implements EventData {
|
||||
private static final long serialVersionUID = -5749964088848611074L;
|
||||
|
||||
private String name;
|
||||
private String publicationUrl;
|
||||
private final Venue venue;
|
||||
private boolean isPublic;
|
||||
private final Serializable id;
|
||||
|
||||
public EventDataImpl(String name, String venueName, String publicationUrl, boolean isPublic, Serializable id) {
|
||||
this(name, new VenueImpl(venueName), publicationUrl, isPublic, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param venue must not be <code>null</code>
|
||||
*/
|
||||
public EventDataImpl(String name, Venue venue, String publicationUrl, boolean isPublic, Serializable id) {
|
||||
assert venue != null;
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.venue = venue;
|
||||
this.publicationUrl = publicationUrl;
|
||||
this.isPublic = isPublic;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Venue getVenue() {
|
||||
return venue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPublicationUrl() {
|
||||
return publicationUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPublicationUrl(String publicationUrl) {
|
||||
this.publicationUrl = publicationUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param newName must not be <code>null</code>
|
||||
*/
|
||||
public void setName(String newName) {
|
||||
if (newName == null) {
|
||||
throw new IllegalArgumentException("An event name must not be null");
|
||||
}
|
||||
this.name = newName;
|
||||
}
|
||||
|
||||
public boolean isPublic() {
|
||||
return isPublic;
|
||||
}
|
||||
|
||||
public void setPublic(boolean isPublic) {
|
||||
this.isPublic = isPublic;
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.base.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sap.sailing.domain.base.EventData;
|
||||
import com.sap.sailing.domain.base.Venue;
|
||||
|
||||
public class EventDataImpl implements EventData {
|
||||
private static final long serialVersionUID = -5749964088848611074L;
|
||||
|
||||
private String name;
|
||||
private String publicationUrl;
|
||||
private final Venue venue;
|
||||
private boolean isPublic;
|
||||
private final Serializable id;
|
||||
|
||||
public EventDataImpl(String name, String venueName, String publicationUrl, boolean isPublic, Serializable id) {
|
||||
this(name, new VenueImpl(venueName), publicationUrl, isPublic, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param venue must not be <code>null</code>
|
||||
*/
|
||||
public EventDataImpl(String name, Venue venue, String publicationUrl, boolean isPublic, Serializable id) {
|
||||
assert venue != null;
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.venue = venue;
|
||||
this.publicationUrl = publicationUrl;
|
||||
this.isPublic = isPublic;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Venue getVenue() {
|
||||
return venue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPublicationUrl() {
|
||||
return publicationUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPublicationUrl(String publicationUrl) {
|
||||
this.publicationUrl = publicationUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param newName must not be <code>null</code>
|
||||
*/
|
||||
public void setName(String newName) {
|
||||
if (newName == null) {
|
||||
throw new IllegalArgumentException("An event name must not be null");
|
||||
}
|
||||
this.name = newName;
|
||||
}
|
||||
|
||||
public boolean isPublic() {
|
||||
return isPublic;
|
||||
}
|
||||
|
||||
public void setPublic(boolean isPublic) {
|
||||
this.isPublic = isPublic;
|
||||
}
|
||||
|
||||
}
|
||||
+2
-2
@@ -29,13 +29,13 @@ public interface RaceGroup extends Named {
|
||||
* Gets the {@link CourseArea} associated with the {@link RaceGroup}.
|
||||
*/
|
||||
public CourseArea getDefaultCourseArea();
|
||||
|
||||
|
||||
/**
|
||||
* Gets the associated {@link BoatClass} if any present, otherwise
|
||||
* <code>null</code>.
|
||||
*/
|
||||
public BoatClass getBoatClass();
|
||||
|
||||
|
||||
/**
|
||||
* Gets the collection of series.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -7,6 +7,6 @@ import com.sap.sailing.domain.base.Fleet;
|
||||
*/
|
||||
public interface RaceRow {
|
||||
Fleet getFleet();
|
||||
|
||||
|
||||
Iterable<RaceCell> getCells();
|
||||
}
|
||||
+22
-22
@@ -1,22 +1,22 @@
|
||||
package com.sap.sailing.domain.base.racegroup.impl;
|
||||
|
||||
import com.sap.sailing.domain.base.racegroup.RaceCell;
|
||||
import com.sap.sailing.domain.common.impl.NamedImpl;
|
||||
import com.sap.sailing.domain.racelog.RaceLog;
|
||||
|
||||
public class RaceCellImpl extends NamedImpl implements RaceCell {
|
||||
private static final long serialVersionUID = 971598420407273594L;
|
||||
|
||||
private RaceLog raceLog;
|
||||
|
||||
public RaceCellImpl(String name, RaceLog raceLog) {
|
||||
super(name);
|
||||
this.raceLog = raceLog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLog getRaceLog() {
|
||||
return raceLog;
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.base.racegroup.impl;
|
||||
|
||||
import com.sap.sailing.domain.base.racegroup.RaceCell;
|
||||
import com.sap.sailing.domain.common.impl.NamedImpl;
|
||||
import com.sap.sailing.domain.racelog.RaceLog;
|
||||
|
||||
public class RaceCellImpl extends NamedImpl implements RaceCell {
|
||||
private static final long serialVersionUID = 971598420407273594L;
|
||||
|
||||
private RaceLog raceLog;
|
||||
|
||||
public RaceCellImpl(String name, RaceLog raceLog) {
|
||||
super(name);
|
||||
this.raceLog = raceLog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLog getRaceLog() {
|
||||
return raceLog;
|
||||
}
|
||||
|
||||
}
|
||||
+40
-40
@@ -1,40 +1,40 @@
|
||||
package com.sap.sailing.domain.base.racegroup.impl;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.CourseArea;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceGroup;
|
||||
import com.sap.sailing.domain.base.racegroup.SeriesWithRows;
|
||||
import com.sap.sailing.domain.common.impl.NamedImpl;
|
||||
|
||||
|
||||
public class RaceGroupImpl extends NamedImpl implements RaceGroup {
|
||||
private static final long serialVersionUID = 7760879536339600827L;
|
||||
|
||||
private final BoatClass boatClass;
|
||||
private final CourseArea courseArea;
|
||||
private final Iterable<SeriesWithRows> series;
|
||||
|
||||
public RaceGroupImpl(
|
||||
String name,
|
||||
BoatClass boatClass,
|
||||
CourseArea courseArea,
|
||||
Iterable<SeriesWithRows> series) {
|
||||
super(name);
|
||||
this.boatClass = boatClass;
|
||||
this.courseArea = courseArea;
|
||||
this.series = series;
|
||||
}
|
||||
|
||||
public CourseArea getDefaultCourseArea() {
|
||||
return courseArea;
|
||||
}
|
||||
|
||||
public Iterable<SeriesWithRows> getSeries() {
|
||||
return series;
|
||||
}
|
||||
|
||||
public BoatClass getBoatClass() {
|
||||
return boatClass;
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.base.racegroup.impl;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.CourseArea;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceGroup;
|
||||
import com.sap.sailing.domain.base.racegroup.SeriesWithRows;
|
||||
import com.sap.sailing.domain.common.impl.NamedImpl;
|
||||
|
||||
|
||||
public class RaceGroupImpl extends NamedImpl implements RaceGroup {
|
||||
private static final long serialVersionUID = 7760879536339600827L;
|
||||
|
||||
private final BoatClass boatClass;
|
||||
private final CourseArea courseArea;
|
||||
private final Iterable<SeriesWithRows> series;
|
||||
|
||||
public RaceGroupImpl(
|
||||
String name,
|
||||
BoatClass boatClass,
|
||||
CourseArea courseArea,
|
||||
Iterable<SeriesWithRows> series) {
|
||||
super(name);
|
||||
this.boatClass = boatClass;
|
||||
this.courseArea = courseArea;
|
||||
this.series = series;
|
||||
}
|
||||
|
||||
public CourseArea getDefaultCourseArea() {
|
||||
return courseArea;
|
||||
}
|
||||
|
||||
public Iterable<SeriesWithRows> getSeries() {
|
||||
return series;
|
||||
}
|
||||
|
||||
public BoatClass getBoatClass() {
|
||||
return boatClass;
|
||||
}
|
||||
|
||||
}
|
||||
+27
-27
@@ -1,27 +1,27 @@
|
||||
package com.sap.sailing.domain.base.racegroup.impl;
|
||||
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceCell;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceRow;
|
||||
|
||||
public class RaceRowImpl implements RaceRow {
|
||||
|
||||
private Fleet fleet;
|
||||
private Iterable<RaceCell> races;
|
||||
|
||||
public RaceRowImpl(Fleet fleet, Iterable<RaceCell> races) {
|
||||
this.fleet = fleet;
|
||||
this.races = races;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fleet getFleet() {
|
||||
return fleet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<RaceCell> getCells() {
|
||||
return races;
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.base.racegroup.impl;
|
||||
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceCell;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceRow;
|
||||
|
||||
public class RaceRowImpl implements RaceRow {
|
||||
|
||||
private Fleet fleet;
|
||||
private Iterable<RaceCell> races;
|
||||
|
||||
public RaceRowImpl(Fleet fleet, Iterable<RaceCell> races) {
|
||||
this.fleet = fleet;
|
||||
this.races = races;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fleet getFleet() {
|
||||
return fleet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<RaceCell> getCells() {
|
||||
return races;
|
||||
}
|
||||
|
||||
}
|
||||
+43
-43
@@ -1,43 +1,43 @@
|
||||
package com.sap.sailing.domain.base.racegroup.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceRow;
|
||||
import com.sap.sailing.domain.base.racegroup.SeriesWithRows;
|
||||
|
||||
public class SeriesWithRowsImpl implements SeriesWithRows {
|
||||
private static final long serialVersionUID = 8825402393444809944L;
|
||||
|
||||
private String name;
|
||||
private Iterable<RaceRow> raceRows;
|
||||
private boolean isMedal;
|
||||
|
||||
public SeriesWithRowsImpl(String name, boolean isMedal, Iterable<RaceRow> raceRows) {
|
||||
this.name = name;
|
||||
this.raceRows = raceRows;
|
||||
this.isMedal = isMedal;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public boolean isMedal() {
|
||||
return isMedal;
|
||||
}
|
||||
|
||||
public Iterable<RaceRow> getRaceRows() {
|
||||
return raceRows;
|
||||
}
|
||||
|
||||
public Iterable<? extends Fleet> getFleets() {
|
||||
Collection<Fleet> fleets = new ArrayList<Fleet>();
|
||||
for (RaceRow row : raceRows) {
|
||||
fleets.add(row.getFleet());
|
||||
}
|
||||
return fleets;
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.base.racegroup.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceRow;
|
||||
import com.sap.sailing.domain.base.racegroup.SeriesWithRows;
|
||||
|
||||
public class SeriesWithRowsImpl implements SeriesWithRows {
|
||||
private static final long serialVersionUID = 8825402393444809944L;
|
||||
|
||||
private String name;
|
||||
private Iterable<RaceRow> raceRows;
|
||||
private boolean isMedal;
|
||||
|
||||
public SeriesWithRowsImpl(String name, boolean isMedal, Iterable<RaceRow> raceRows) {
|
||||
this.name = name;
|
||||
this.raceRows = raceRows;
|
||||
this.isMedal = isMedal;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public boolean isMedal() {
|
||||
return isMedal;
|
||||
}
|
||||
|
||||
public Iterable<RaceRow> getRaceRows() {
|
||||
return raceRows;
|
||||
}
|
||||
|
||||
public Iterable<? extends Fleet> getFleets() {
|
||||
Collection<Fleet> fleets = new ArrayList<Fleet>();
|
||||
for (RaceRow row : raceRows) {
|
||||
fleets.add(row.getFleet());
|
||||
}
|
||||
return fleets;
|
||||
}
|
||||
|
||||
}
|
||||
+24
-24
@@ -1,24 +1,24 @@
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
public enum Flags {
|
||||
NONE,
|
||||
ALPHA,
|
||||
BRAVO,
|
||||
CLASS,
|
||||
FOXTROTT,
|
||||
GOLF,
|
||||
HOTEL,
|
||||
INDIA,
|
||||
NOVEMBER,
|
||||
PAPA,
|
||||
XRAY,
|
||||
ZULU,
|
||||
FIRSTSUBSTITUTE,
|
||||
BLACK,
|
||||
BLUE,
|
||||
JURY,
|
||||
AP,
|
||||
ESSONE,
|
||||
ESSTWO,
|
||||
ESSTHREE
|
||||
}
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
public enum Flags {
|
||||
NONE,
|
||||
ALPHA,
|
||||
BRAVO,
|
||||
CLASS,
|
||||
FOXTROTT,
|
||||
GOLF,
|
||||
HOTEL,
|
||||
INDIA,
|
||||
NOVEMBER,
|
||||
PAPA,
|
||||
XRAY,
|
||||
ZULU,
|
||||
FIRSTSUBSTITUTE,
|
||||
BLACK,
|
||||
BLUE,
|
||||
JURY,
|
||||
AP,
|
||||
ESSONE,
|
||||
ESSTWO,
|
||||
ESSTHREE
|
||||
}
|
||||
+9
-9
@@ -1,9 +1,9 @@
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public interface RaceLogCourseAreaChangedEvent extends RaceLogEvent {
|
||||
|
||||
Serializable getCourseAreaId();
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public interface RaceLogCourseAreaChangedEvent extends RaceLogEvent {
|
||||
|
||||
Serializable getCourseAreaId();
|
||||
|
||||
}
|
||||
+43
-43
@@ -1,43 +1,43 @@
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.Timed;
|
||||
import com.sap.sailing.domain.common.WithID;
|
||||
|
||||
/**
|
||||
* Records an event that is sent by the race log via the Race Committee Cockpit App.
|
||||
* The event is timed and may influence the state of a race depending on its context
|
||||
* the the current state of the RaceLog.
|
||||
*
|
||||
* Subclasses may be flag events (AP, N, X, P, etc.) or operational race events.
|
||||
*
|
||||
*/
|
||||
public interface RaceLogEvent extends Timed, WithID {
|
||||
|
||||
/**
|
||||
* Gets the event's pass identifier.
|
||||
*
|
||||
* Each {@link RaceLogEvent} is associated to a certain pass. A pass
|
||||
* is every attempt to start and run a race. A new pass is initiated
|
||||
* when a new start time is proposed (e.g. after the race was aborted).
|
||||
*
|
||||
*/
|
||||
int getPassId();
|
||||
|
||||
/**
|
||||
* Gets the list of associated {@link Competitor}s.
|
||||
*
|
||||
* A {@link RaceLogEvent} might be associated with a list of competitors,
|
||||
* which are somehow relevant for this kind of event. An example is a list
|
||||
* of competitors who are marked for an individual recall.
|
||||
*/
|
||||
List<Competitor> getInvolvedBoats();
|
||||
|
||||
/**
|
||||
* Visitor pattern to implement certain {@link RaceLogEvent} subclass specific
|
||||
* behavior.
|
||||
*/
|
||||
void accept(RaceLogEventVisitor visitor);
|
||||
}
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.Timed;
|
||||
import com.sap.sailing.domain.common.WithID;
|
||||
|
||||
/**
|
||||
* Records an event that is sent by the race log via the Race Committee Cockpit App.
|
||||
* The event is timed and may influence the state of a race depending on its context
|
||||
* the the current state of the RaceLog.
|
||||
*
|
||||
* Subclasses may be flag events (AP, N, X, P, etc.) or operational race events.
|
||||
*
|
||||
*/
|
||||
public interface RaceLogEvent extends Timed, WithID {
|
||||
|
||||
/**
|
||||
* Gets the event's pass identifier.
|
||||
*
|
||||
* Each {@link RaceLogEvent} is associated to a certain pass. A pass
|
||||
* is every attempt to start and run a race. A new pass is initiated
|
||||
* when a new start time is proposed (e.g. after the race was aborted).
|
||||
*
|
||||
*/
|
||||
int getPassId();
|
||||
|
||||
/**
|
||||
* Gets the list of associated {@link Competitor}s.
|
||||
*
|
||||
* A {@link RaceLogEvent} might be associated with a list of competitors,
|
||||
* which are somehow relevant for this kind of event. An example is a list
|
||||
* of competitors who are marked for an individual recall.
|
||||
*/
|
||||
List<Competitor> getInvolvedBoats();
|
||||
|
||||
/**
|
||||
* Visitor pattern to implement certain {@link RaceLogEvent} subclass specific
|
||||
* behavior.
|
||||
*/
|
||||
void accept(RaceLogEventVisitor visitor);
|
||||
}
|
||||
+16
-16
@@ -8,20 +8,20 @@ import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.racelog.impl.RaceLogEventFactoryImpl;
|
||||
|
||||
public interface RaceLogEventFactory {
|
||||
RaceLogEventFactory INSTANCE = new RaceLogEventFactoryImpl();
|
||||
|
||||
RaceLogFlagEvent createFlagEvent(TimePoint timePoint, Serializable id, List<Competitor> involvedBoats, int passId, Flags upperFlag, Flags lowerFlag, boolean isDisplayed);
|
||||
RaceLogFlagEvent createFlagEvent(TimePoint timePoint, int passId, Flags upperFlag, Flags lowerFlag, boolean isDisplayed);
|
||||
|
||||
RaceLogStartTimeEvent createStartTimeEvent(TimePoint timePoint, Serializable id, List<Competitor> involvedBoats, int passId, RaceLogRaceStatus nextStatus, TimePoint startTime);
|
||||
RaceLogStartTimeEvent createStartTimeEvent(TimePoint timePoint, int passId, RaceLogRaceStatus nextStatus, TimePoint startTime);
|
||||
|
||||
RaceLogRaceStatusEvent createRaceStatusEvent(TimePoint timePoint, Serializable id, List<Competitor> competitors, int passId, RaceLogRaceStatus nextStatus);
|
||||
RaceLogRaceStatusEvent createRaceStatusEvent(TimePoint timePoint, int passId, RaceLogRaceStatus nextStatus);
|
||||
|
||||
RaceLogPassChangeEvent createRaceLogPassChangeEvent(TimePoint timePoint, Serializable id, List<Competitor> competitors, int passId);
|
||||
RaceLogPassChangeEvent createRaceLogPassChangeEvent(TimePoint timePoint, int passId);
|
||||
|
||||
RaceLogCourseAreaChangedEvent createRaceLogCourseAreaChangedEvent(TimePoint timePoint, Serializable id, List<Competitor> competitors, int passId, Serializable courseAreaId);
|
||||
RaceLogCourseAreaChangedEvent createRaceLogCourseAreaChangedEvent(TimePoint timePoint, int passId, Serializable courseAreaId);
|
||||
RaceLogEventFactory INSTANCE = new RaceLogEventFactoryImpl();
|
||||
|
||||
RaceLogFlagEvent createFlagEvent(TimePoint timePoint, Serializable id, List<Competitor> involvedBoats, int passId, Flags upperFlag, Flags lowerFlag, boolean isDisplayed);
|
||||
RaceLogFlagEvent createFlagEvent(TimePoint timePoint, int passId, Flags upperFlag, Flags lowerFlag, boolean isDisplayed);
|
||||
|
||||
RaceLogStartTimeEvent createStartTimeEvent(TimePoint timePoint, Serializable id, List<Competitor> involvedBoats, int passId, RaceLogRaceStatus nextStatus, TimePoint startTime);
|
||||
RaceLogStartTimeEvent createStartTimeEvent(TimePoint timePoint, int passId, RaceLogRaceStatus nextStatus, TimePoint startTime);
|
||||
|
||||
RaceLogRaceStatusEvent createRaceStatusEvent(TimePoint timePoint, Serializable id, List<Competitor> competitors, int passId, RaceLogRaceStatus nextStatus);
|
||||
RaceLogRaceStatusEvent createRaceStatusEvent(TimePoint timePoint, int passId, RaceLogRaceStatus nextStatus);
|
||||
|
||||
RaceLogPassChangeEvent createRaceLogPassChangeEvent(TimePoint timePoint, Serializable id, List<Competitor> competitors, int passId);
|
||||
RaceLogPassChangeEvent createRaceLogPassChangeEvent(TimePoint timePoint, int passId);
|
||||
|
||||
RaceLogCourseAreaChangedEvent createRaceLogCourseAreaChangedEvent(TimePoint timePoint, Serializable id, List<Competitor> competitors, int passId, Serializable courseAreaId);
|
||||
RaceLogCourseAreaChangedEvent createRaceLogCourseAreaChangedEvent(TimePoint timePoint, int passId, Serializable courseAreaId);
|
||||
}
|
||||
+10
-10
@@ -1,10 +1,10 @@
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
public interface RaceLogFlagEvent extends RaceLogEvent {
|
||||
|
||||
Flags getUpperFlag();
|
||||
|
||||
Flags getLowerFlag();
|
||||
|
||||
boolean isDisplayed();
|
||||
}
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
public interface RaceLogFlagEvent extends RaceLogEvent {
|
||||
|
||||
Flags getUpperFlag();
|
||||
|
||||
Flags getLowerFlag();
|
||||
|
||||
boolean isDisplayed();
|
||||
}
|
||||
+9
-9
@@ -1,9 +1,9 @@
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
/**
|
||||
* @author D053502
|
||||
*
|
||||
*/
|
||||
public enum RaceLogRaceStatus {
|
||||
UNKNOWN, UNSCHEDULED, SCHEDULED, STARTPHASE, RUNNING, FINISHING, FINISHED
|
||||
}
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
/**
|
||||
* @author D053502
|
||||
*
|
||||
*/
|
||||
public enum RaceLogRaceStatus {
|
||||
UNKNOWN, UNSCHEDULED, SCHEDULED, STARTPHASE, RUNNING, FINISHING, FINISHED
|
||||
}
|
||||
+11
-11
@@ -1,11 +1,11 @@
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
/**
|
||||
* Events to indicate the new race status which is valid for all events
|
||||
* arriving after this event (on the same pass).
|
||||
*/
|
||||
public interface RaceLogRaceStatusEvent extends RaceLogEvent {
|
||||
|
||||
RaceLogRaceStatus getNextStatus();
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
/**
|
||||
* Events to indicate the new race status which is valid for all events
|
||||
* arriving after this event (on the same pass).
|
||||
*/
|
||||
public interface RaceLogRaceStatusEvent extends RaceLogEvent {
|
||||
|
||||
RaceLogRaceStatus getNextStatus();
|
||||
|
||||
}
|
||||
+8
-8
@@ -1,8 +1,8 @@
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
|
||||
public interface RaceLogStartTimeEvent extends RaceLogRaceStatusEvent {
|
||||
|
||||
TimePoint getStartTime();
|
||||
}
|
||||
package com.sap.sailing.domain.racelog;
|
||||
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
|
||||
public interface RaceLogStartTimeEvent extends RaceLogRaceStatusEvent {
|
||||
|
||||
TimePoint getStartTime();
|
||||
}
|
||||
+33
-33
@@ -1,33 +1,33 @@
|
||||
package com.sap.sailing.domain.racelog.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.racelog.RaceLogCourseAreaChangedEvent;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEventVisitor;
|
||||
|
||||
public class RaceLogCourseAreaChangeEventImpl extends RaceLogEventImpl implements
|
||||
RaceLogCourseAreaChangedEvent {
|
||||
private static final long serialVersionUID = -3943108136024977860L;
|
||||
|
||||
private Serializable courseAreaId;
|
||||
|
||||
public RaceLogCourseAreaChangeEventImpl(TimePoint pTimePoint,
|
||||
Serializable pId, List<Competitor> pInvolvedBoats, int pPassId, Serializable courseAreaId) {
|
||||
super(pTimePoint, pId, pInvolvedBoats, pPassId);
|
||||
this.courseAreaId = courseAreaId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable getCourseAreaId() {
|
||||
return courseAreaId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(RaceLogEventVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.racelog.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.racelog.RaceLogCourseAreaChangedEvent;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEventVisitor;
|
||||
|
||||
public class RaceLogCourseAreaChangeEventImpl extends RaceLogEventImpl implements
|
||||
RaceLogCourseAreaChangedEvent {
|
||||
private static final long serialVersionUID = -3943108136024977860L;
|
||||
|
||||
private Serializable courseAreaId;
|
||||
|
||||
public RaceLogCourseAreaChangeEventImpl(TimePoint pTimePoint,
|
||||
Serializable pId, List<Competitor> pInvolvedBoats, int pPassId, Serializable courseAreaId) {
|
||||
super(pTimePoint, pId, pInvolvedBoats, pPassId);
|
||||
this.courseAreaId = courseAreaId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable getCourseAreaId() {
|
||||
return courseAreaId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(RaceLogEventVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
||||
}
|
||||
+49
-49
@@ -18,62 +18,62 @@ import com.sap.sailing.domain.racelog.RaceLogStartTimeEvent;
|
||||
|
||||
public class RaceLogEventFactoryImpl implements RaceLogEventFactory {
|
||||
|
||||
@Override
|
||||
public RaceLogFlagEvent createFlagEvent(TimePoint timePoint, Serializable id, List<Competitor> involvedBoats, int passId,
|
||||
Flags upperFlag, Flags lowerFlag, boolean isDisplayed) {
|
||||
return new RaceLogFlagEventImpl(timePoint, id, involvedBoats, passId, upperFlag, lowerFlag, isDisplayed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLogFlagEvent createFlagEvent(TimePoint timePoint,
|
||||
int passId, Flags upperFlag, Flags lowerFlag, boolean isDisplayed) {
|
||||
return createFlagEvent(timePoint, UUID.randomUUID(), new ArrayList<Competitor>(), passId, upperFlag, lowerFlag, isDisplayed);
|
||||
}
|
||||
@Override
|
||||
public RaceLogFlagEvent createFlagEvent(TimePoint timePoint, Serializable id, List<Competitor> involvedBoats, int passId,
|
||||
Flags upperFlag, Flags lowerFlag, boolean isDisplayed) {
|
||||
return new RaceLogFlagEventImpl(timePoint, id, involvedBoats, passId, upperFlag, lowerFlag, isDisplayed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLogStartTimeEvent createStartTimeEvent(TimePoint timePoint, Serializable id, List<Competitor> involvedBoats, int passId,
|
||||
RaceLogRaceStatus nextStatus, TimePoint startTime) {
|
||||
return new RaceLogStartTimeEventImpl(timePoint, id, involvedBoats, passId, nextStatus, startTime);
|
||||
}
|
||||
@Override
|
||||
public RaceLogFlagEvent createFlagEvent(TimePoint timePoint,
|
||||
int passId, Flags upperFlag, Flags lowerFlag, boolean isDisplayed) {
|
||||
return createFlagEvent(timePoint, UUID.randomUUID(), new ArrayList<Competitor>(), passId, upperFlag, lowerFlag, isDisplayed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLogStartTimeEvent createStartTimeEvent(TimePoint timePoint, int passId, RaceLogRaceStatus nextStatus, TimePoint startTime) {
|
||||
return createStartTimeEvent(timePoint, UUID.randomUUID(), new ArrayList<Competitor>(), passId, nextStatus, startTime);
|
||||
}
|
||||
@Override
|
||||
public RaceLogStartTimeEvent createStartTimeEvent(TimePoint timePoint, Serializable id, List<Competitor> involvedBoats, int passId,
|
||||
RaceLogRaceStatus nextStatus, TimePoint startTime) {
|
||||
return new RaceLogStartTimeEventImpl(timePoint, id, involvedBoats, passId, nextStatus, startTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLogRaceStatusEvent createRaceStatusEvent(TimePoint timePoint,Serializable id, List<Competitor> competitors, int passId,
|
||||
RaceLogRaceStatus nextStatus) {
|
||||
return new RaceLogRaceStatusEventImpl(timePoint, id, competitors, passId, nextStatus);
|
||||
}
|
||||
@Override
|
||||
public RaceLogStartTimeEvent createStartTimeEvent(TimePoint timePoint, int passId, RaceLogRaceStatus nextStatus, TimePoint startTime) {
|
||||
return createStartTimeEvent(timePoint, UUID.randomUUID(), new ArrayList<Competitor>(), passId, nextStatus, startTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLogRaceStatusEvent createRaceStatusEvent(TimePoint timePoint,
|
||||
int passId, RaceLogRaceStatus nextStatus) {
|
||||
return createRaceStatusEvent(timePoint, UUID.randomUUID(), new ArrayList<Competitor>(), passId, nextStatus);
|
||||
}
|
||||
@Override
|
||||
public RaceLogRaceStatusEvent createRaceStatusEvent(TimePoint timePoint,Serializable id, List<Competitor> competitors, int passId,
|
||||
RaceLogRaceStatus nextStatus) {
|
||||
return new RaceLogRaceStatusEventImpl(timePoint, id, competitors, passId, nextStatus);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLogPassChangeEvent createRaceLogPassChangeEvent(TimePoint timePoint, Serializable id, List<Competitor> competitors,
|
||||
int passId) {
|
||||
return new RaceLogPassChangeEventImpl(timePoint, id, competitors, passId);
|
||||
}
|
||||
@Override
|
||||
public RaceLogRaceStatusEvent createRaceStatusEvent(TimePoint timePoint,
|
||||
int passId, RaceLogRaceStatus nextStatus) {
|
||||
return createRaceStatusEvent(timePoint, UUID.randomUUID(), new ArrayList<Competitor>(), passId, nextStatus);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLogPassChangeEvent createRaceLogPassChangeEvent(TimePoint timePoint, int passId) {
|
||||
return createRaceLogPassChangeEvent(timePoint, UUID.randomUUID(), new ArrayList<Competitor>(), passId);
|
||||
}
|
||||
@Override
|
||||
public RaceLogPassChangeEvent createRaceLogPassChangeEvent(TimePoint timePoint, Serializable id, List<Competitor> competitors,
|
||||
int passId) {
|
||||
return new RaceLogPassChangeEventImpl(timePoint, id, competitors, passId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLogCourseAreaChangedEvent createRaceLogCourseAreaChangedEvent(TimePoint timePoint, Serializable id, List<Competitor> competitors,
|
||||
int passId, Serializable courseAreaId) {
|
||||
return new RaceLogCourseAreaChangeEventImpl(timePoint, id, competitors, passId, courseAreaId);
|
||||
}
|
||||
@Override
|
||||
public RaceLogPassChangeEvent createRaceLogPassChangeEvent(TimePoint timePoint, int passId) {
|
||||
return createRaceLogPassChangeEvent(timePoint, UUID.randomUUID(), new ArrayList<Competitor>(), passId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLogCourseAreaChangedEvent createRaceLogCourseAreaChangedEvent(
|
||||
TimePoint timePoint, int passId, Serializable courseAreaId) {
|
||||
return createRaceLogCourseAreaChangedEvent(timePoint, UUID.randomUUID(), new ArrayList<Competitor>(), passId, courseAreaId);
|
||||
}
|
||||
@Override
|
||||
public RaceLogCourseAreaChangedEvent createRaceLogCourseAreaChangedEvent(TimePoint timePoint, Serializable id, List<Competitor> competitors,
|
||||
int passId, Serializable courseAreaId) {
|
||||
return new RaceLogCourseAreaChangeEventImpl(timePoint, id, competitors, passId, courseAreaId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLogCourseAreaChangedEvent createRaceLogCourseAreaChangedEvent(
|
||||
TimePoint timePoint, int passId, Serializable courseAreaId) {
|
||||
return createRaceLogCourseAreaChangedEvent(timePoint, UUID.randomUUID(), new ArrayList<Competitor>(), passId, courseAreaId);
|
||||
}
|
||||
|
||||
}
|
||||
+55
-55
@@ -1,55 +1,55 @@
|
||||
package com.sap.sailing.domain.racelog.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEvent;
|
||||
|
||||
public abstract class RaceLogEventImpl implements RaceLogEvent {
|
||||
|
||||
private static final long serialVersionUID = -5810258278984777732L;
|
||||
|
||||
private TimePoint timePoint;
|
||||
private Serializable id;
|
||||
private List<Competitor> involvedBoats;
|
||||
private int passId;
|
||||
|
||||
public RaceLogEventImpl(TimePoint pTimePoint, Serializable pId, List<Competitor> pInvolvedBoats, int pPassId) {
|
||||
this.timePoint = pTimePoint;
|
||||
this.id = pId;
|
||||
this.involvedBoats = pInvolvedBoats;
|
||||
this.passId = pPassId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TimePoint getTimePoint() {
|
||||
return timePoint;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Competitor> getInvolvedBoats() {
|
||||
return involvedBoats;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPassId() {
|
||||
return passId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return object instanceof RaceLogEvent
|
||||
&& timePoint.equals(((RaceLogEvent) object).getTimePoint())
|
||||
&& id.equals(((RaceLogEvent) object).getId())
|
||||
&& involvedBoats.equals(((RaceLogEvent) object).getInvolvedBoats())
|
||||
&& passId == ((RaceLogEvent) object).getPassId();
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.racelog.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEvent;
|
||||
|
||||
public abstract class RaceLogEventImpl implements RaceLogEvent {
|
||||
|
||||
private static final long serialVersionUID = -5810258278984777732L;
|
||||
|
||||
private TimePoint timePoint;
|
||||
private Serializable id;
|
||||
private List<Competitor> involvedBoats;
|
||||
private int passId;
|
||||
|
||||
public RaceLogEventImpl(TimePoint pTimePoint, Serializable pId, List<Competitor> pInvolvedBoats, int pPassId) {
|
||||
this.timePoint = pTimePoint;
|
||||
this.id = pId;
|
||||
this.involvedBoats = pInvolvedBoats;
|
||||
this.passId = pPassId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TimePoint getTimePoint() {
|
||||
return timePoint;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Competitor> getInvolvedBoats() {
|
||||
return involvedBoats;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPassId() {
|
||||
return passId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return object instanceof RaceLogEvent
|
||||
&& timePoint.equals(((RaceLogEvent) object).getTimePoint())
|
||||
&& id.equals(((RaceLogEvent) object).getId())
|
||||
&& involvedBoats.equals(((RaceLogEvent) object).getInvolvedBoats())
|
||||
&& passId == ((RaceLogEvent) object).getPassId();
|
||||
}
|
||||
|
||||
}
|
||||
+55
-55
@@ -1,55 +1,55 @@
|
||||
package com.sap.sailing.domain.racelog.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.racelog.Flags;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEventVisitor;
|
||||
import com.sap.sailing.domain.racelog.RaceLogFlagEvent;
|
||||
|
||||
public class RaceLogFlagEventImpl extends RaceLogEventImpl implements RaceLogFlagEvent {
|
||||
|
||||
private static final long serialVersionUID = 6333303528852541914L;
|
||||
private Flags upperFlag;
|
||||
private Flags lowerFlag;
|
||||
private boolean isDisplayed;
|
||||
|
||||
public RaceLogFlagEventImpl(TimePoint pTimePoint, Serializable pId, List<Competitor> pInvolvedBoats, int pPassId, Flags pUpperFlag, Flags pLowerFlag, boolean pIsDisplayed) {
|
||||
super(pTimePoint, pId, pInvolvedBoats, pPassId);
|
||||
this.upperFlag = pUpperFlag;
|
||||
this.lowerFlag = pLowerFlag;
|
||||
this.isDisplayed = pIsDisplayed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flags getUpperFlag() {
|
||||
return upperFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flags getLowerFlag() {
|
||||
return lowerFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDisplayed() {
|
||||
return isDisplayed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(RaceLogEventVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return super.equals(object)
|
||||
&& object instanceof RaceLogFlagEvent
|
||||
&& upperFlag.equals(((RaceLogFlagEvent) object).getUpperFlag())
|
||||
&& lowerFlag.equals(((RaceLogFlagEvent) object).getLowerFlag())
|
||||
&& isDisplayed == ((RaceLogFlagEvent) object).isDisplayed();
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.racelog.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.racelog.Flags;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEventVisitor;
|
||||
import com.sap.sailing.domain.racelog.RaceLogFlagEvent;
|
||||
|
||||
public class RaceLogFlagEventImpl extends RaceLogEventImpl implements RaceLogFlagEvent {
|
||||
|
||||
private static final long serialVersionUID = 6333303528852541914L;
|
||||
private Flags upperFlag;
|
||||
private Flags lowerFlag;
|
||||
private boolean isDisplayed;
|
||||
|
||||
public RaceLogFlagEventImpl(TimePoint pTimePoint, Serializable pId, List<Competitor> pInvolvedBoats, int pPassId, Flags pUpperFlag, Flags pLowerFlag, boolean pIsDisplayed) {
|
||||
super(pTimePoint, pId, pInvolvedBoats, pPassId);
|
||||
this.upperFlag = pUpperFlag;
|
||||
this.lowerFlag = pLowerFlag;
|
||||
this.isDisplayed = pIsDisplayed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flags getUpperFlag() {
|
||||
return upperFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flags getLowerFlag() {
|
||||
return lowerFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDisplayed() {
|
||||
return isDisplayed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(RaceLogEventVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return super.equals(object)
|
||||
&& object instanceof RaceLogFlagEvent
|
||||
&& upperFlag.equals(((RaceLogFlagEvent) object).getUpperFlag())
|
||||
&& lowerFlag.equals(((RaceLogFlagEvent) object).getLowerFlag())
|
||||
&& isDisplayed == ((RaceLogFlagEvent) object).isDisplayed();
|
||||
}
|
||||
|
||||
}
|
||||
+24
-24
@@ -1,24 +1,24 @@
|
||||
package com.sap.sailing.domain.racelog.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEventVisitor;
|
||||
import com.sap.sailing.domain.racelog.RaceLogPassChangeEvent;
|
||||
|
||||
public class RaceLogPassChangeEventImpl extends RaceLogEventImpl implements RaceLogPassChangeEvent {
|
||||
private static final long serialVersionUID = -3737606977320640630L;
|
||||
|
||||
public RaceLogPassChangeEventImpl(TimePoint pTimePoint, Serializable pId,
|
||||
List<Competitor> pInvolvedBoats, int pPassId) {
|
||||
super(pTimePoint, pId, pInvolvedBoats, pPassId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(RaceLogEventVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.racelog.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEventVisitor;
|
||||
import com.sap.sailing.domain.racelog.RaceLogPassChangeEvent;
|
||||
|
||||
public class RaceLogPassChangeEventImpl extends RaceLogEventImpl implements RaceLogPassChangeEvent {
|
||||
private static final long serialVersionUID = -3737606977320640630L;
|
||||
|
||||
public RaceLogPassChangeEventImpl(TimePoint pTimePoint, Serializable pId,
|
||||
List<Competitor> pInvolvedBoats, int pPassId) {
|
||||
super(pTimePoint, pId, pInvolvedBoats, pPassId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(RaceLogEventVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
||||
}
|
||||
+37
-40
@@ -1,40 +1,37 @@
|
||||
package com.sap.sailing.domain.racelog.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEventVisitor;
|
||||
import com.sap.sailing.domain.racelog.RaceLogRaceStatus;
|
||||
import com.sap.sailing.domain.racelog.RaceLogRaceStatusEvent;
|
||||
|
||||
public class RaceLogRaceStatusEventImpl extends RaceLogEventImpl implements
|
||||
RaceLogRaceStatusEvent {
|
||||
private static final long serialVersionUID = -8809758843066724482L;
|
||||
|
||||
protected RaceLogRaceStatus nextStatus;
|
||||
|
||||
public RaceLogRaceStatusEventImpl(
|
||||
TimePoint pTimePoint,
|
||||
Serializable pId,
|
||||
List<Competitor> pInvolvedBoats,
|
||||
int pPassId,
|
||||
RaceLogRaceStatus nextStatus) {
|
||||
super(pTimePoint, pId, pInvolvedBoats, pPassId);
|
||||
this.nextStatus = nextStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLogRaceStatus getNextStatus() {
|
||||
return nextStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(RaceLogEventVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.racelog.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEventVisitor;
|
||||
import com.sap.sailing.domain.racelog.RaceLogRaceStatus;
|
||||
import com.sap.sailing.domain.racelog.RaceLogRaceStatusEvent;
|
||||
|
||||
public class RaceLogRaceStatusEventImpl extends RaceLogEventImpl implements
|
||||
RaceLogRaceStatusEvent {
|
||||
private static final long serialVersionUID = -8809758843066724482L;
|
||||
|
||||
protected RaceLogRaceStatus nextStatus;
|
||||
|
||||
public RaceLogRaceStatusEventImpl(
|
||||
TimePoint pTimePoint,
|
||||
Serializable pId,
|
||||
List<Competitor> pInvolvedBoats,
|
||||
int pPassId,
|
||||
RaceLogRaceStatus nextStatus) {
|
||||
super(pTimePoint, pId, pInvolvedBoats, pPassId);
|
||||
this.nextStatus = nextStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceLogRaceStatus getNextStatus() {
|
||||
return nextStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(RaceLogEventVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
}
|
||||
+47
-47
@@ -1,47 +1,47 @@
|
||||
package com.sap.sailing.domain.racelog.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEventVisitor;
|
||||
import com.sap.sailing.domain.racelog.RaceLogRaceStatus;
|
||||
import com.sap.sailing.domain.racelog.RaceLogStartTimeEvent;
|
||||
|
||||
public class RaceLogStartTimeEventImpl extends RaceLogRaceStatusEventImpl
|
||||
implements RaceLogStartTimeEvent {
|
||||
|
||||
private static final long serialVersionUID = 8185811395997196162L;
|
||||
private TimePoint startTime;
|
||||
|
||||
public RaceLogStartTimeEventImpl(
|
||||
TimePoint pTimePoint,
|
||||
Serializable pId,
|
||||
List<Competitor> pInvolvedBoats,
|
||||
int pPassId,
|
||||
RaceLogRaceStatus nextStatus,
|
||||
TimePoint pStartTime) {
|
||||
super(pTimePoint, pId, pInvolvedBoats, pPassId, nextStatus);
|
||||
this.startTime = pStartTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TimePoint getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(RaceLogEventVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
/// TODO: please check the implementation of this method... why is this needed?
|
||||
return super.equals(object)
|
||||
&& object instanceof RaceLogStartTimeEvent
|
||||
&& startTime.equals(((RaceLogStartTimeEvent) object).getStartTime());
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.domain.racelog.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEventVisitor;
|
||||
import com.sap.sailing.domain.racelog.RaceLogRaceStatus;
|
||||
import com.sap.sailing.domain.racelog.RaceLogStartTimeEvent;
|
||||
|
||||
public class RaceLogStartTimeEventImpl extends RaceLogRaceStatusEventImpl
|
||||
implements RaceLogStartTimeEvent {
|
||||
|
||||
private static final long serialVersionUID = 8185811395997196162L;
|
||||
private TimePoint startTime;
|
||||
|
||||
public RaceLogStartTimeEventImpl(
|
||||
TimePoint pTimePoint,
|
||||
Serializable pId,
|
||||
List<Competitor> pInvolvedBoats,
|
||||
int pPassId,
|
||||
RaceLogRaceStatus nextStatus,
|
||||
TimePoint pStartTime) {
|
||||
super(pTimePoint, pId, pInvolvedBoats, pPassId, nextStatus);
|
||||
this.startTime = pStartTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TimePoint getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(RaceLogEventVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
/// TODO: please check the implementation of this method... why is this needed?
|
||||
return super.equals(object)
|
||||
&& object instanceof RaceLogStartTimeEvent
|
||||
&& startTime.equals(((RaceLogStartTimeEvent) object).getStartTime());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user