Class Group

    • Constructor Detail

      • Group

        public Group​(Database database)
      • Group

        public Group​(Database database,
                     Entity entity,
                     java.lang.String name,
                     User owner)
    • Method Detail

      • getEntity

        public Entity getEntity()
        Description copied from interface: EntityType
        Gets the entity associated with this object.
        Specified by:
        getEntity in interface EntityType
        Returns:
        Associated entity.
      • setEntity

        public void setEntity​(Entity entity)
      • getName

        public java.lang.String getName()
        Description copied from interface: UserGroup
        Gets the name of this group.
        Specified by:
        getName in interface UserGroup
        Returns:
        group name.
      • getOwner

        public User getOwner()
        Description copied from interface: UserGroup
        Gets this group's owner.
        Specified by:
        getOwner in interface UserGroup
        Returns:
        owner.
      • getMembership

        public java.util.Collection<UserGroupMembership> getMembership()
        Description copied from interface: UserGroup
        Gets a collection of individual memberships, which is more definite than getUsers(), providing more specific information about membership.
        Specified by:
        getMembership in interface UserGroup
        Returns:
        immutable collection of user group membership records.
      • getMembership

        public UserGroupMembership getMembership​(User user)
        Description copied from interface: UserGroup
        Gets the membership record for a specific user.
        Specified by:
        getMembership in interface UserGroup
        Parameters:
        user - User to search membership records for.
        Returns:
        membership instance.
      • addUser

        public void addUser​(User user)
                     throws java.lang.SecurityException
        Description copied from interface: UserGroup
        Adds a user to this group.
        Specified by:
        addUser in interface UserGroup
        Parameters:
        user - user to add.
        Throws:
        java.lang.SecurityException - if there is a security violation adding the user.
      • setName

        public void setName​(java.lang.String name)
      • getGroupId

        public int getGroupId()
      • setOwner

        public void setOwner​(User user)
        Description copied from interface: UserGroup
        Sets the owner of this group.
        Specified by:
        setOwner in interface UserGroup
        Parameters:
        user - user to set as the new owner of this group.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object