Package app.entity.user
Class UserFactory
java.lang.Object
app.entity.user.UserFactory
The
UserFactory class provides a factory method for creating user objects based on the specified user type.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
UserFactory
public UserFactory()
-
-
Method Details
-
getUser
Creates and returns a user object based on the specified user type.- Parameters:
userType- The type of the user (e.g., "student" or "staff").ID- The ID of the user.name- The name of the user.faculty- The faculty of the user.- Returns:
- A user object of the specified type, or
nullif the user type is unknown.
-