Package africa.absa.inception.security
Class Group
- java.lang.Object
-
- africa.absa.inception.security.Group
-
- All Implemented Interfaces:
Serializable
@Entity public class Group extends Object implements Serializable
The Group class holds the information for a group.- Author:
- Marcus Portmann
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRole(Role role)Add the role to the group.voidaddUser(User user)Add the user to the group.booleanequals(Object object)Indicates whether some other object is "equal to" this one.LocalDateTimegetCreated()Returns the date and time the group was created.StringgetDescription()Returns the description for the group.UUIDgetId()Returns the Universally Unique Identifier (UUID) for the group.StringgetName()Returns the name of the group.Set<Role>getRoles()Returns the roles associated with the group.LocalDateTimegetUpdated()Returns the date and time the group was last updated.UUIDgetUserDirectoryId()Returns the Universally Unique Identifier (UUID) for the user directory the group is associated with.Set<User>getUsers()Returns the users associated with the group.inthashCode()Returns a hash code value for the object.protected voidonCreate()protected voidonUpdate()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.voidsetId(UUID id)Set the Universally Unique Identifier (UUID) for the group.voidsetName(String name)Set the name of the group.voidsetRoles(Set<Role> roles)Set the roles associated with the group.voidsetUserDirectoryId(UUID userDirectoryId)Set the Universally Unique Identifier (UUID) for the user directory the group is associated with.voidsetUsers(Set<User> users)Set the users associated with the group.
-
-
-
Constructor Detail
-
Group
public Group()
Constructs a new Group.
-
Group
public Group(String name)
Constructs a new Group.- Parameters:
name- the name of the group
-
-
Method Detail
-
addRole
public void addRole(Role role)
Add the role to the group.- Parameters:
role- the role
-
addUser
public void addUser(User user)
Add the user to the group.- Parameters:
user- the user
-
equals
public boolean equals(Object object)
Indicates whether some other object is "equal to" this one.
-
getCreated
public LocalDateTime getCreated()
Returns the date and time the group was created.- Returns:
- the date and time the group was created
-
getDescription
public String getDescription()
Returns the description for the group.- Returns:
- the description for the group
-
getId
public UUID getId()
Returns the Universally Unique Identifier (UUID) for the group.- Returns:
- the Universally Unique Identifier (UUID) for the group
-
getName
public String getName()
Returns the name of the group.- Returns:
- the name of the group
-
getRoles
public Set<Role> getRoles()
Returns the roles associated with the group.- Returns:
- the roles associated with the group
-
getUpdated
public LocalDateTime getUpdated()
Returns the date and time the group was last updated.- Returns:
- the date and time the group was last updated
-
getUserDirectoryId
public UUID getUserDirectoryId()
Returns the Universally Unique Identifier (UUID) for the user directory the group is associated with.- Returns:
- the Universally Unique Identifier (UUID) for the user directory the group is associated with
-
getUsers
public Set<User> 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
public void removeRole(Role role)
Remove the role from the group.- Parameters:
role- the role
-
removeUser
public void removeUser(User user)
Remove the user from the group.- Parameters:
user- the user
-
setDescription
public void setDescription(String description)
Set the description for the group.- Parameters:
description- the description for the group
-
setId
public void setId(UUID id)
Set the Universally Unique Identifier (UUID) for the group.- Parameters:
id- the Universally Unique Identifier (UUID) for the group
-
setName
public void setName(String name)
Set the name of the group.- Parameters:
name- the name of the group
-
setRoles
public void setRoles(Set<Role> roles)
Set the roles associated with the group.- Parameters:
roles- the roles associated with the group
-
setUserDirectoryId
public void setUserDirectoryId(UUID userDirectoryId)
Set the Universally Unique Identifier (UUID) for the user directory the group is associated with.- Parameters:
userDirectoryId- the Universally Unique Identifier (UUID) for the user directory the group is associated with
-
setUsers
public void setUsers(Set<User> users)
Set the users associated with the group.- Parameters:
users- the users associated with the group
-
onCreate
protected void onCreate()
-
onUpdate
protected void onUpdate()
-
-