mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-22 21:55:39 +00:00
bug5867: a locally tested working implementation of RacingEventService.getAllTrackedRacesForEventTrackingAt(...)
This commit is contained in:
-3
@@ -11,9 +11,6 @@ import com.sap.sse.common.NamedWithID;
|
||||
* 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 "Charly".<p>
|
||||
*
|
||||
* Equality and with it the {@link #hashCode()} are defined based on the fields, so in particular the {@link #getId() ID},
|
||||
* the {@link #getName() name}, {@link #getCenterPosition() center position} and {@link #getRadius() radius}.
|
||||
*
|
||||
* @author Axel Uhl (D043530)
|
||||
*
|
||||
*/
|
||||
|
||||
-43
@@ -39,47 +39,4 @@ public class CourseAreaImpl extends NamedImpl implements CourseArea {
|
||||
public CourseArea resolve(SharedDomainFactory<?> domainFactory) {
|
||||
return domainFactory.getOrCreateCourseArea(id, getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((centerPosition == null) ? 0 : centerPosition.hashCode());
|
||||
result = prime * result + ((id == null) ? 0 : id.hashCode());
|
||||
result = prime * result + ((radius == null) ? 0 : radius.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
CourseAreaImpl other = (CourseAreaImpl) obj;
|
||||
if (getName() == null) {
|
||||
if (other.getName() != null)
|
||||
return false;
|
||||
} else if (!getName().equals(other.getName()))
|
||||
return false;
|
||||
if (centerPosition == null) {
|
||||
if (other.centerPosition != null)
|
||||
return false;
|
||||
} else if (!centerPosition.equals(other.centerPosition))
|
||||
return false;
|
||||
if (id == null) {
|
||||
if (other.id != null)
|
||||
return false;
|
||||
} else if (!id.equals(other.id))
|
||||
return false;
|
||||
if (radius == null) {
|
||||
if (other.radius != null)
|
||||
return false;
|
||||
} else if (!radius.equals(other.radius))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user