Class UserRole

java.lang.Object
io.goobi.viewer.model.security.user.UserRole
All Implemented Interfaces:
Serializable

@Entity public class UserRole extends Object implements Serializable
Objects that map roles to users within a user group.
See Also:
  • Constructor Details

    • UserRole

      public UserRole()
      Empty constructor.
    • UserRole

      public UserRole(UserGroup userGroup, User user, Role role)
      Creates a new UserRole instance.
      Parameters:
      userGroup - a UserGroup object.
      user - a User object.
      role - a Role object.
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getId

      public Long getId()
      Getter for the field id.
      Returns:
      the database identifier of this user role assignment
    • setId

      public void setId(Long id)
      Setter for the field id.
      Parameters:
      id - the database identifier to set
    • getUserGroup

      public UserGroup getUserGroup()
      Getter for the field userGroup.
      Returns:
      the user group this role assignment belongs to
    • setUserGroup

      public void setUserGroup(UserGroup userGroup)
      Setter for the field userGroup.
      Parameters:
      userGroup - the user group this role assignment belongs to
    • getUser

      public User getUser()
      Getter for the field user.
      Returns:
      the user this role assignment belongs to
    • setUser

      public void setUser(User user)
      Setter for the field user.
      Parameters:
      user - the user this role assignment belongs to
    • getRole

      public Role getRole()
      Getter for the field role.
      Returns:
      the role assigned to the user within the group
    • setRole

      public void setRole(Role role)
      Setter for the field role.
      Parameters:
      role - the role assigned to the user within the group
    • toString

      public String toString()
      Overrides:
      toString in class Object