|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfi.paatti.paattidatabaseutils.dbobjects.User
public class User
User object holds the username, ID, groups and roles of the user. It also has some methods to check if the user belongs to a certain group or has some role in those groups.
![]() |
![]() |
| Constructor Summary | |
|---|---|
User(int userID)
User constructor. |
|
| Method Summary | |
|---|---|
void |
addUserGroup(UserGroup ugGroup)
Adds a new user group to the user. |
ArrayList<UserGroup> |
getUserGroups()
Returns the user's groups. |
int |
getUserID()
Returns the value of userID. |
String |
getUsername()
Returns the value of username. |
boolean |
hasRoleInAnyGroup(int roleID)
Checks if the user has the given role in any of his/her groups. |
boolean |
hasRoleInUserGRoup(int roleID,
int usergroupID)
Checks if the user has the given role in the given group. |
boolean |
isInUserGroup(int usergroupID)
Checks if the user belongs to a certain user group. |
void |
setUsername(String username)
Sets the value of username. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public User(int userID)
userID - The ID of the user.| Method Detail |
|---|
public String getUsername()
public void setUsername(String username)
username - new value of username.public int getUserID()
public ArrayList<UserGroup> getUserGroups()
public void addUserGroup(UserGroup ugGroup)
ugGroup - user grouppublic boolean isInUserGroup(int usergroupID)
usergroupID - the user group's id.
public boolean hasRoleInUserGRoup(int roleID,
int usergroupID)
roleID - The ID of the user role.usergroupID - The ID of the user group.
public boolean hasRoleInAnyGroup(int roleID)
roleID - The ID of the user role.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||