Class Doctor

java.lang.Object
org.cswteams.ms3.entity.User
org.cswteams.ms3.entity.Doctor

@Entity public class Doctor extends User
A Doctor in the system.
See Also:
  • Field Details

    • id

      protected Long 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 doctor
      lastname - The surname of the doctor
      taxCode - Italian "codice fiscale"
      birthday - Date of birth
      email - E-mail of the doctor
      password - Password of the doctor
      seniority - Seniority of the doctor
      roles - Set of roles of the doctor in the system (configurator/planner/doctor/user)
    • Doctor

      protected Doctor()
      Default constructor needed by Lombok
  • Method Details

    • addCondition

      public void addCondition(Condition condition) throws Exception
      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

      public void addPreference(Preference preference)
      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

      public void addSpecialization(Specialization specialization)
      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.