Class SingleSportDistance

All Implemented Interfaces:
Serializable

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

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

  • distance : the distance, in meters, of the Course.
  • laps : the number of laps that the distance is divided into.
See Also:
  • Constructor Details

    • SingleSportDistance

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

    • getDistance

      public Integer getDistance()
    • setDistance

      public void setDistance(Integer distance)
    • getLaps

      public Integer getLaps()
    • setLaps

      public void setLaps(Integer laps)
    • 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