Class AquathlonDistance

All Implemented Interfaces:
Serializable

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

Besides the fields inherited from Distance, the AquathlonDistance'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.
  • 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

    • AquathlonDistance

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

    • getSwimDistance

      public Integer getSwimDistance()
    • setSwimDistance

      public void setSwimDistance(Integer swimDistance)
    • getSwimLaps

      public Integer getSwimLaps()
    • setSwimLaps

      public void setSwimLaps(Integer swimLaps)
    • 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