Class 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
      • Group

        public Group​(UUID userDirectoryId,
                     String name,
                     String description)
        Constructs a new Group.
        Parameters:
        userDirectoryId - the Universally Unique Identifier (UUID) for the user directory the group is associated with
        name - the name of the group
        description - the description for 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.
        Overrides:
        equals in class Object
        Parameters:
        object - the reference object with which to compare
        Returns:
        true if this object is the same as the object argument otherwise false
      • 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.
        Overrides:
        hashCode in class Object
        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()