Package africa.absa.inception.security
Class Group
java.lang.Object
africa.absa.inception.security.Group
- All Implemented Interfaces:
Serializable
The Group class holds the information for a group.
- Author:
- Marcus Portmann
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the role to the group.voidAdd the user to the group.booleanIndicates whether some other object is "equal to" this one.Returns the date and time the group was created.Returns the description for the group.getId()Returns the ID for the group.getName()Returns the name of the group.getRoles()Returns the roles associated with the group.Returns the date and time the group was last updated.Returns the ID for the user directory the group is associated with.getUsers()Returns the users associated with the group.inthashCode()Returns a hash code value for the object.protected voidonCreate()The Java Persistence callback method invoked before the entity is created in the database.protected voidonUpdate()The Java Persistence callback method invoked before the entity is updated in the database.voidremoveRole(Role role) Remove the role from the group.voidremoveUser(User user) Remove the user from the group.voidsetDescription(String description) Set the description for the group.voidSet the ID for the group.voidSet the name of the group.voidSet the roles associated with the group.voidsetUserDirectoryId(UUID userDirectoryId) Set the ID for the user directory the group is associated with.voidSet the users associated with the group.
-
Constructor Details
-
Group
public Group()Constructs a new Group. -
Group
Constructs a new Group.- Parameters:
name- the name of the group
-
Group
Constructs a new Group.- Parameters:
userDirectoryId- the ID for the user directory the group is associated withname- the name of the groupdescription- the description for the group
-
-
Method Details
-
addRole
Add the role to the group.- Parameters:
role- the role
-
addUser
Add the user to the group.- Parameters:
user- the user
-
equals
Indicates whether some other object is "equal to" this one. -
getCreated
Returns the date and time the group was created.- Returns:
- the date and time the group was created
-
getDescription
Returns the description for the group.- Returns:
- the description for the group
-
getId
Returns the ID for the group.- Returns:
- the ID for the group
-
getName
Returns the name of the group.- Returns:
- the name of the group
-
getRoles
Returns the roles associated with the group.- Returns:
- the roles associated with the group
-
getUpdated
Returns the date and time the group was last updated.- Returns:
- the date and time the group was last updated
-
getUserDirectoryId
Returns the ID for the user directory the group is associated with.- Returns:
- the ID for the user directory the group is associated with
-
getUsers
Returns the users associated with the group.- Returns:
- the users associated with the group
-
hashCode
public int hashCode()Returns a hash code value for the object. -
removeRole
Remove the role from the group.- Parameters:
role- the role
-
removeUser
Remove the user from the group.- Parameters:
user- the user
-
setDescription
Set the description for the group.- Parameters:
description- the description for the group
-
setId
Set the ID for the group.- Parameters:
id- the ID for the group
-
setName
Set the name of the group.- Parameters:
name- the name of the group
-
setRoles
Set the roles associated with the group.- Parameters:
roles- the roles associated with the group
-
setUserDirectoryId
Set the ID for the user directory the group is associated with.- Parameters:
userDirectoryId- the ID for the user directory the group is associated with
-
setUsers
Set the users associated with the group.- Parameters:
users- the users associated with the group
-
onCreate
protected void onCreate()The Java Persistence callback method invoked before the entity is created in the database. -
onUpdate
protected void onUpdate()The Java Persistence callback method invoked before the entity is updated in the database.
-