Class ResultsFile
java.lang.Object
com.endurancetrio.data.common.model.entity.AuditableEntity
com.endurancetrio.data.common.model.entity.BaseEntity<Long>
com.endurancetrio.data.event.model.entity.ResultsFile
- All Implemented Interfaces:
Serializable
The
ResultsFile entity represents a file storing the official results of a Race.
The ResultsFile's fields are defined as follows:
-
id: the unique identifier of theResultsFilethat is automatically generated and is the primary key. -
title: the title of theRace. It should ideally match the championship it belongs to (e.g., "Individual National Championship") or describe the race distance (e.g., "Duathlon Powerman Mafra Sprint" or "Duathlon Powerman Mafra Standard"). -
subtitle: the subtitle of theRace. If thegenderCategoryalone is sufficient to distinguish the race, it is used as thesubtitle(e.g., "Women"). Otherwise, both theage groupand thegenderCategoryare included (e.g., "Elite Women"). -
fileName: the name of theResultsFilewhich has exactly 21 characters and follows the format "YYYYMMDDXXXNNN-YYYZ-VV.ext". In this format, "YYYMMDDXXXNNN-YYY" corresponds to theraceReference, "Z" defines the class of the results contained in theResultsFile, "VV" corresponds to the revision/version of the file (the first revision always starts at "01") and "ext" corresponds to the extension (Mime type) of the file. The letter corresponding to the class of results has the value "A" when the results correspond to the absolute classification of theRaceand "B" when the results are grouped byage group(additional letters may be used when applicable.). ThefileNameis unique, there cannot be two differentResultsFilewith the samefileName. -
revisionNumber: the revision number of theresults file. The first revision always starts at "01". -
isActive: flag that indicates the most recent version of aResultsFile. It is set to true for the file with the highestrevisionNumberand false for all previous versions.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanEquality is based on the entity's identifier.getTitle()inthashCode()voidvoidsetFileName(String fileName) voidsetRevision(Integer revision) voidsetSubtitle(String subtitle) 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
-
ResultsFile
public ResultsFile()Default constructor for theResultsFileentity.
-
-
Method Details
-
getTitle
-
setTitle
-
getSubtitle
-
setSubtitle
-
getFileName
-
setFileName
-
getRevision
-
setRevision
-
getActive
-
setActive
-
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
-