Class Instructor
java.lang.Object
org.codewithmagret.rest.instructor.Instructor
Entity class representing an Instructor in the system.
An instructor can teach multiple courses, but each course is taught by one instructor.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor required by JPA.Instructor(String firstName, String lastName, String email) Constructs a new Instructor with the specified first name, last name, and email. -
Method Summary
Modifier and TypeMethodDescriptionGets the list of courses taught by this instructor.getEmail()Gets the email address of the instructor.Gets the first name of the instructor.getId()Gets the unique identifier of the instructor.Gets the last name of the instructor.voidsetCourses(List<Course> courses) Sets the list of courses taught by this instructor.voidSets the email address of the instructor.voidsetFirstName(String firstName) Sets the first name of the instructor.voidSets the unique identifier of the instructor.voidsetLastName(String lastName) Sets the last name of the instructor.
-
Constructor Details
-
Instructor
public Instructor()Default constructor required by JPA. Initializes a new instance of the Instructor class. -
Instructor
-
-
Method Details
-
getId
-
setId
Sets the unique identifier of the instructor.- Parameters:
id- the ID to set for the instructor
-
getFirstName
Gets the first name of the instructor.- Returns:
- the first name of the instructor
-
setFirstName
Sets the first name of the instructor.- Parameters:
firstName- the first name to set for the instructor
-
getLastName
Gets the last name of the instructor.- Returns:
- the last name of the instructor
-
setLastName
Sets the last name of the instructor.- Parameters:
lastName- the last name to set for the instructor
-
getEmail
Gets the email address of the instructor.- Returns:
- the email address of the instructor
-
setEmail
Sets the email address of the instructor.- Parameters:
email- the email address to set for the instructor
-
getCourses
-
setCourses
-