Class CoursesByStudent

java.lang.Object
org.codewithmagret.rest.report.dto.CoursesByStudent

public class CoursesByStudent extends Object
DTO for the report of courses by student.
  • Constructor Details

    • CoursesByStudent

      public CoursesByStudent()
      Default constructor for CoursesByStudent. Required for JSON deserialization.
    • CoursesByStudent

      public CoursesByStudent(Long studentId, String firstName, String lastName, List<SimpleCourse> courses)
      Parameterized constructor for CoursesByStudent.
      Parameters:
      studentId - the ID of the student
      firstName - the first name of the student
      lastName - the last name of the student
      courses - the list of courses taken by the student
  • Method Details

    • getStudentId

      public Long getStudentId()
      Getters and setters for the fields of CoursesByStudent.
      Returns:
      the student ID, first name, last name, and list of courses
    • setStudentId

      public void setStudentId(Long studentId)
      Setters for the fields of CoursesByStudent.
      Parameters:
      studentId - the ID of the student to set
    • getFirstName

      public String getFirstName()
      Getters for the fields of CoursesByStudent.
      Returns:
      the first name of the student
    • setFirstName

      public void setFirstName(String firstName)
      Setters for the fields of CoursesByStudent.
      Parameters:
      firstName - the first name of the student to set
    • getLastName

      public String getLastName()
      Getters for the fields of CoursesByStudent.
      Returns:
      the last name of the student
    • setLastName

      public void setLastName(String lastName)
      Setters for the fields of CoursesByStudent.
      Parameters:
      lastName - the last name of the student to set
    • getCourses

      public List<SimpleCourse> getCourses()
      Getters for the fields of CoursesByStudent.
      Returns:
      the list of courses taken by the student
    • setCourses

      public void setCourses(List<SimpleCourse> courses)
      Setters for the fields of CoursesByStudent.
      Parameters:
      courses - the list of courses taken by the student to set