Class ResultsFile

All Implemented Interfaces:
Serializable

@Entity(name="ResultsFile") public class ResultsFile extends BaseEntity<Long>
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 the ResultsFile that is automatically generated and is the primary key.
  • title : the title of the Race. 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 the Race. If the genderCategory alone is sufficient to distinguish the race, it is used as the subtitle (e.g., "Women"). Otherwise, both the age group and the genderCategory are included (e.g., "Elite Women").
  • fileName : the name of the ResultsFile which has exactly 21 characters and follows the format "YYYYMMDDXXXNNN-YYYZ-VV.ext". In this format, "YYYMMDDXXXNNN-YYY" corresponds to the raceReference, "Z" defines the class of the results contained in the ResultsFile, "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 the Race and "B" when the results are grouped by age group (additional letters may be used when applicable.). The fileName is unique, there cannot be two different ResultsFile with the same fileName.
  • revisionNumber : the revision number of the results file. The first revision always starts at "01".
  • isActive : flag that indicates the most recent version of a ResultsFile. It is set to true for the file with the highest revisionNumber and false for all previous versions.
See Also:
  • Constructor Details

    • ResultsFile

      public ResultsFile()
      Default constructor for the ResultsFile entity.
  • Method Details

    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • getSubtitle

      public String getSubtitle()
    • setSubtitle

      public void setSubtitle(String subtitle)
    • getFileName

      public String getFileName()
    • setFileName

      public void setFileName(String fileName)
    • getRevision

      public Integer getRevision()
    • setRevision

      public void setRevision(Integer revision)
    • getActive

      public Boolean getActive()
    • setActive

      public void setActive(Boolean active)
    • 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