Class TriathlonDistance

All Implemented Interfaces:
Serializable

@Entity(name="TriathlonDistance") public class TriathlonDistance extends Distance implements Serializable
The TriathlonDistance entity extends the Distance entity and represents the data of a Triathlon and Cross Triathlon Course's Distance.

Besides the fields inherited from Distance, the TriathlonDistance's fields are defined as follows:

  • swimDistance : the distance, in meters, of the swim leg of the Course
  • swimLaps : the number of laps that the swim distance is divided into
  • bikeDistance : the distance, in meters, of the bike leg of the Course
  • bikeLaps : the number of laps that the bike distance is divided into
  • runDistance : the distance, in meters, of the run leg of the Course
  • runLaps : the number of laps that the run distance is divided into
See Also:
  • Constructor Details

    • TriathlonDistance

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

    • getSwimDistance

      public Integer getSwimDistance()
    • setSwimDistance

      public void setSwimDistance(Integer swimDistance)
    • getSwimLaps

      public Integer getSwimLaps()
    • setSwimLaps

      public void setSwimLaps(Integer swimLaps)
    • getBikeDistance

      public Integer getBikeDistance()
    • setBikeDistance

      public void setBikeDistance(Integer bikeDistance)
    • getBikeLaps

      public Integer getBikeLaps()
    • setBikeLaps

      public void setBikeLaps(Integer bikeLaps)
    • getRunDistance

      public Integer getRunDistance()
    • setRunDistance

      public void setRunDistance(Integer runDistance)
    • getRunLaps

      public Integer getRunLaps()
    • setRunLaps

      public void setRunLaps(Integer runLaps)
    • 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 Distance
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Distance
    • toString

      public String toString()
      Overrides:
      toString in class Distance