Class Student
java.lang.Object
org.codewithmagret.rest.student.Student
Represents a student entity in the system.
This class is mapped to a database table using JPA annotations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the list of courses the student is enrolled in.Gets the first name of the student.getId()Gets the unique identifier of the student.Gets the last name of the student.voidsetCourses(List<Course> courses) Sets the list of courses the student is enrolled in.voidsetFirstName(String firstName) Sets the first name of the student.voidSets the unique identifier of the student.voidsetLastName(String lastName) Sets the last name of the student.
-
Constructor Details
-
Student
public Student()Default constructor required by JPA. Initializes a new instance of the Student class. -
Student
-
-
Method Details
-
getId
-
setId
Sets the unique identifier of the student.- Parameters:
id- the ID to set for the student
-
getFirstName
Gets the first name of the student.- Returns:
- the first name of the student
-
setFirstName
Sets the first name of the student.- Parameters:
firstName- the first name to set for the student
-
getLastName
Gets the last name of the student.- Returns:
- the last name of the student
-
setLastName
Sets the last name of the student.- Parameters:
lastName- the last name to set for the student
-
getCourses
-
setCourses
-