/** * gets the Receptionist object from the receptionistId. */ public void associateReceptionist() //Void for the return type of variable/object { try { if (receptionistId != "") { receptionist = (Receptionist)DataSearching.findUser(receptionistId); //Because we are taking from a list of Users and wish to assign this to a Receptionist, it must be casted back. receptionist.setPractice(this); } } catch (Exception e) { GeneralFunctions.errorHandler(e); } }