Class TeamResult

All Implemented Interfaces:
Serializable

@Entity(name="TeamResult") public class TeamResult extends BaseEntity<Long>
The TeamResult entity represents a team's result in a collective Race.

Team results are calculated from the individual results of team members. The calculation method depends on the race type.

The TeamResult's fields are defined as follows:

  • id : the unique identifier of the TeamResult that is automatically generated and is the primary key.
  • race : the Race that this team result belongs to.
  • rank : the team's finishing position in the team classification.
  • sourceResult : the parent TeamResult that this result is derived from, if any.
  • penalty : the Penalty applied to the team in this Race.
  • team : the Team that this result belongs to.
  • teamName : the display name of the Team as it appears in this specific Race's results.
  • athletesCount : the number of athletes contributing to this team result.
  • individualResults : the individual race results that contribute to this team result.
  • ageGroup : the AgeGroup of the team for this specific Race.
  • bib : the team's race bib number.
  • cumulativeRank : the sum of the finishing positions of the athletes contributing to the team classification.
  • total : the total team time in milliseconds.
  • points : the points earned by the team in this Race.
See Also:
  • Constructor Details

    • TeamResult

      public TeamResult()
  • Method Details

    • addIndividualResult

      public void addIndividualResult(IndividualResult individualResult)
      Adds an individual IndividualResult to this TeamResult's contributing results.
      Parameters:
      individualResult - the IndividualResult to add; ignored if null or already present
    • removeIndividualResult

      public void removeIndividualResult(IndividualResult individualResult)
      Removes an individual IndividualResult from this TeamResult's contributing results.
      Parameters:
      individualResult - the IndividualResult to remove; ignored if null or not present
    • getRace

      public Race getRace()
    • setRace

      public void setRace(Race race)
    • getRank

      public Integer getRank()
    • setRank

      public void setRank(Integer rank)
    • getSourceResult

      public TeamResult getSourceResult()
    • setSourceResult

      public void setSourceResult(TeamResult sourceResult)
    • getPenalty

      public Penalty getPenalty()
    • setPenalty

      public void setPenalty(Penalty penalty)
    • getTeam

      public Team getTeam()
    • setTeam

      public void setTeam(Team team)
    • getTeamName

      public String getTeamName()
    • setTeamName

      public void setTeamName(String teamName)
    • getAthletesCount

      public Integer getAthletesCount()
    • setAthletesCount

      public void setAthletesCount(Integer athletesCount)
    • getIndividualResults

      public Set<IndividualResult> getIndividualResults()
    • setIndividualResults

      public void setIndividualResults(Set<IndividualResult> individualResults)
    • getAgeGroup

      public AgeGroup getAgeGroup()
    • setAgeGroup

      public void setAgeGroup(AgeGroup ageGroup)
    • getParaClass

      public ParaClass getParaClass()
    • setParaClass

      public void setParaClass(ParaClass paraClass)
    • getBib

      public String getBib()
    • setBib

      public void setBib(String bib)
    • getCumulativeRank

      public Integer getCumulativeRank()
    • setCumulativeRank

      public void setCumulativeRank(Integer cumulativeRank)
    • getTotal

      public Duration getTotal()
    • setTotal

      public void setTotal(Duration total)
    • getPoints

      public Integer getPoints()
    • setPoints

      public void setPoints(Integer points)
    • equals

      public boolean equals(Object o)
      Description copied from class: BaseEntity
      Equality is based on the entity's identifier. Two entities are considered equal if they are of the same class and have the same non-null identifier.

      If the ID is null, we treat it as a transient (new) object. Transient objects are only equal if they are the exact same instance.

      Overrides:
      equals in class BaseEntity<Long>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BaseEntity<Long>
    • toString

      public String toString()
      Overrides:
      toString in class Object