Class AthleteProfileUpdateDTO

java.lang.Object
fr.utc.miage.sporttrack.dto.AthleteProfileUpdateDTO

public class AthleteProfileUpdateDTO extends Object
Data Transfer Object (DTO) used for athlete profile update form binding within the SportTrack application.

This DTO replaces direct use of the Athlete JPA entity as a @ModelAttribute to prevent mass assignment vulnerabilities (SonarQube java:S4684). It exposes only the profile fields that an athlete is permitted to modify through the profile update form.

Author:
SportTrack Team
  • Constructor Details

    • AthleteProfileUpdateDTO

      public AthleteProfileUpdateDTO()
  • Method Details

    • getUsername

      public String getUsername()
      Returns the username.
      Returns:
      the athlete's username
    • getFirstName

      public String getFirstName()
      Returns the first name of the athlete.
      Returns:
      the first name
    • getLastName

      public String getLastName()
      Returns the last name of the athlete.
      Returns:
      the last name
    • getGender

      public Gender getGender()
      Returns the gender of the athlete.
      Returns:
      the Gender
    • getAge

      public Integer getAge()
      Returns the age of the athlete.
      Returns:
      the age in years
    • getHeight

      public Double getHeight()
      Returns the height of the athlete.
      Returns:
      the height in centimetres
    • getWeight

      public Double getWeight()
      Returns the weight of the athlete.
      Returns:
      the weight in kilograms
    • getPracticeLevel

      public PracticeLevel getPracticeLevel()
      Returns the practice level of the athlete.
      Returns:
      the PracticeLevel
    • getBio

      public String getBio()
      Returns the personal biography of the athlete.
      Returns:
      the bio text
    • setUsername

      public void setUsername(String username)
      Sets the username.
      Parameters:
      username - the username to assign
    • setFirstName

      public void setFirstName(String firstName)
      Sets the first name of the athlete.
      Parameters:
      firstName - the first name to assign
    • setLastName

      public void setLastName(String lastName)
      Sets the last name of the athlete.
      Parameters:
      lastName - the last name to assign
    • setGender

      public void setGender(Gender gender)
      Sets the gender of the athlete.
      Parameters:
      gender - the Gender to assign
    • setAge

      public void setAge(Integer age)
      Sets the age of the athlete.
      Parameters:
      age - the age in years to assign
    • setHeight

      public void setHeight(Double height)
      Sets the height of the athlete.
      Parameters:
      height - the height in centimetres to assign
    • setWeight

      public void setWeight(Double weight)
      Sets the weight of the athlete.
      Parameters:
      weight - the weight in kilograms to assign
    • setPracticeLevel

      public void setPracticeLevel(PracticeLevel practiceLevel)
      Sets the practice level of the athlete.
      Parameters:
      practiceLevel - the PracticeLevel to assign
    • setBio

      public void setBio(String bio)
      Sets the personal biography of the athlete.
      Parameters:
      bio - the biography text to assign