I need some expert advice. I need to model different user types for my web application and am not sure how to best model this. Basically the users for the application are therapists. Essentially there are the users of the application. So do I create a therapist table/domain object and a therapistDAO, or do I keep a generic user table/userDAO instead and use role types/names instead? It seems strange having a generic user table and DAO methods always referring to the userTable, when all queries will be against the therapist table. For example, a method to return all therapy types offered by a therapist will be findTherapyTypes(therapist, therapistId). However, if I use user tables and User domain object the method would be the findTherapyTypes(User, userId) which doesnt seem right. If I use a generic User domain object, then it will have a List of therapytypes which doesnt seem correct as it could in the future a different user type lets say Patient, and in this case the List of therapytyppes would always be null as it wouldnt apply.
In the future there might be other user types, e.g. Patient or Customer those who leave feedback based on treatments received by therapists?
I will be using Hibernate so was thinking of using inheritance mapping for the user different user types having a therapist class extend a base User class and implement a User interface with common properties such as firstname, surname etc.
Any feedback would be much appreciated :) :)
thanks Mark