All Implemented Interfaces:
Serializable

@Entity(name="Event") public class Event extends BaseEntity<Long>
The Event entity represents an endurance sport Event that can have one or more endurance races.

The Event's fields are defined as follows:

See Also:
  • Constructor Details

    • Event

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

    • addCourse

      public void addCourse(Course course)
      Adds an Course to the Event. This method also sets the Event reference in the Course.
      Parameters:
      course - the Course to be added
    • removeCourse

      public void removeCourse(Course course)
      Removes an Course from the Event. This method also removes the Event reference from the Course.
      Parameters:
      course - the Course to be removed
    • getEventReference

      public String getEventReference()
    • setEventReference

      public void setEventReference(String eventReference)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • getStartDate

      public LocalDate getStartDate()
    • setStartDate

      public void setStartDate(LocalDate startDate)
    • getEndDate

      public LocalDate getEndDate()
    • setEndDate

      public void setEndDate(LocalDate endDate)
    • getDistrict

      public String getDistrict()
    • setDistrict

      public void setDistrict(String district)
    • getCounty

      public String getCounty()
    • setCounty

      public void setCounty(String county)
    • getCity

      public String getCity()
    • setCity

      public void setCity(String city)
    • getOrganizers

      public Set<Organizer> getOrganizers()
    • setOrganizers

      public void setOrganizers(Set<Organizer> organizers)
    • getEventFiles

      public Set<EventFile> getEventFiles()
    • setEventFiles

      public void setEventFiles(Set<EventFile> eventFiles)
    • getCourses

      public Set<Course> getCourses()
    • setCourses

      public void setCourses(Set<Course> courses)
    • 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