Package org.cswteams.ms3.entity
Class Doctor
java.lang.Object
org.cswteams.ms3.entity.User
org.cswteams.ms3.entity.Doctor
A Doctor in the system.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCondition(Condition condition) Add a condition to this Doctor.voidaddPreference(Preference preference) Add a scheduling preference to this Doctor.voidaddSpecialization(Specialization specialization) Add a specialization to this Doctor.
-
Field Details
-
id
-
-
Constructor Details
-
Doctor
public Doctor(String name, String lastname, String taxCode, LocalDate birthday, String email, String password, Seniority seniority, Set<SystemActor> roles) Create a new Doctor with the specified parameters.- Parameters:
name- The name of the doctorlastname- The surname of the doctortaxCode- Italian "codice fiscale"birthday- Date of birthemail- E-mail of the doctorpassword- Password of the doctorseniority- Seniority of the doctorroles- Set of roles of the doctor in the system (configurator/planner/doctor/user)
-
Doctor
protected Doctor()Default constructor needed by Lombok
-
-
Method Details
-
addCondition
Add a condition to this Doctor. TODO: Create design pattern to handle adding new parameters to doctor (Factory/Builder/Decorator) TODO: Define custom exception to recognize this specific case- Parameters:
condition- New condition to add for a doctor instance (Over62, ecc...)- Throws:
Exception- if the type of the condition is not supported
-
addPreference
Add a scheduling preference to this Doctor. TODO: Create design pattern to handle adding new parameters to doctor (Factory/Builder/Decorator) TODO: Define custom exception to recognize this specific case- Parameters:
preference- scheduling preference for the Doctor
-
addSpecialization
Add a specialization to this Doctor. TODO: Create design pattern to handle adding new parameters to doctor (Factory/Builder/Decorator) TODO: Define custom exception to recognize this specific case- Parameters:
specialization- Doctor's specialization.
-