Class EventFile
java.lang.Object
com.endurancetrio.data.common.model.entity.AuditableEntity
com.endurancetrio.data.common.model.entity.BaseEntity<Long>
com.endurancetrio.data.event.model.entity.EventFile
- All Implemented Interfaces:
Serializable
The
EventFile entity represents a file with information (other than the
race's results) concerning an Event or an event's Race.
An EventFile may refer to the event's guide, regulations, courses or media
images.
The EventFile's fields are defined as follows:
-
id: the unique identifier of theEventFilethat is automatically generated and is the primary key. -
title: the title of the file that should describe theEventFile's content. -
fileType: theFileTypeused to classify the type ofEventFilethat is associated with anEvent. -
fileName: thefilename that has exactly 24 characters and has the format YYYYMMDDXXXNNN-TTTYYY-VV.ext. In this format, "YYYYMMDDXXXNNN" corresponds to theEvent'sreference, "TTT", written in upper case letters, corresponds to the document type ("GDE" for guides, "REG" for Regulations, "MAP" for course maps, "IMG" for images and "STL" for start lists), "YYY" is the document's order number (in the cases where there are, for example, different regulations in the same event: middle distance regulations and full distance regulations), "VV" corresponds to the document's revision number (the first revision always starts at "01") and "ext" corresponds to the file extension (always in lower case letters). -
revisionNumber: the revision number of thefile. The first revision always starts at "01". -
isActive: flag that indicates the most recent version of aEventFile. 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) voidsetFileType(FileType fileType) voidsetRevision(Integer revision) 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
-
EventFile
public EventFile()Default constructor for theEventFileentity.
-
-
Method Details
-
getTitle
-
setTitle
-
getFileType
-
setFileType
-
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
-