Class TeamResult
java.lang.Object
com.endurancetrio.data.common.model.entity.AuditableEntity
com.endurancetrio.data.common.model.entity.BaseEntity<Long>
com.endurancetrio.data.event.model.entity.TeamResult
- All Implemented Interfaces:
Serializable
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 theTeamResultthat is automatically generated and is the primary key. -
race: theRacethat this team result belongs to. -
rank: the team's finishing position in the team classification. -
sourceResult: the parentTeamResultthat this result is derived from, if any. -
penalty: thePenaltyapplied to the team in thisRace. -
team: theTeamthat this result belongs to. -
teamName: the display name of theTeamas it appears in this specificRace's results. -
athletesCount: the number of athletes contributing to this team result. -
individualResults: the individualrace resultsthat contribute to this team result. -
ageGroup: theAgeGroupof the team for this specificRace. -
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 thisRace.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIndividualResult(IndividualResult individualResult) Adds an individualIndividualResultto thisTeamResult's contributing results.booleanEquality is based on the entity's identifier.getBib()getRace()getRank()getTeam()getTotal()inthashCode()voidremoveIndividualResult(IndividualResult individualResult) Removes an individualIndividualResultfrom thisTeamResult's contributing results.voidsetAgeGroup(AgeGroup ageGroup) voidsetAthletesCount(Integer athletesCount) voidvoidsetCumulativeRank(Integer cumulativeRank) voidsetIndividualResults(Set<IndividualResult> individualResults) voidsetParaClass(ParaClass paraClass) voidsetPenalty(Penalty penalty) voidvoidvoidvoidsetSourceResult(TeamResult sourceResult) voidvoidsetTeamName(String teamName) voidtoString()Methods inherited from class com.endurancetrio.data.common.model.entity.BaseEntity
getId, setIdMethods inherited from class com.endurancetrio.data.common.model.entity.AuditableEntity
getCreatedAt, getUpdatedAt, getVersion
-
Constructor Details
-
TeamResult
public TeamResult()
-
-
Method Details
-
addIndividualResult
Adds an individualIndividualResultto thisTeamResult's contributing results.- Parameters:
individualResult- theIndividualResultto add; ignored ifnullor already present
-
removeIndividualResult
Removes an individualIndividualResultfrom thisTeamResult's contributing results.- Parameters:
individualResult- theIndividualResultto remove; ignored ifnullor not present
-
getRace
-
setRace
-
getRank
-
setRank
-
getSourceResult
-
setSourceResult
-
getPenalty
-
setPenalty
-
getTeam
-
setTeam
-
getTeamName
-
setTeamName
-
getAthletesCount
-
setAthletesCount
-
getIndividualResults
-
setIndividualResults
-
getAgeGroup
-
setAgeGroup
-
getParaClass
-
setParaClass
-
getBib
-
setBib
-
getCumulativeRank
-
setCumulativeRank
-
getTotal
-
setTotal
-
getPoints
-
setPoints
-
equals
Description copied from class:BaseEntityEquality 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:
equalsin classBaseEntity<Long>
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseEntity<Long>
-
toString
-