Class JpaRole

java.lang.Object
org.opencastproject.security.impl.jpa.JpaRole
All Implemented Interfaces:
Role

@Entity public final class JpaRole extends Object implements Role
JPA-annotated role object.
  • Constructor Details

    • JpaRole

      public JpaRole()
      No-arg constructor needed by JPA
    • JpaRole

      public JpaRole(String name, JpaOrganization organization)
      Constructs a role with the specified name and organization.
      Parameters:
      name - the name
      organization - the organization
    • JpaRole

      public JpaRole(String name, JpaOrganization organization, String description)
      Constructs a role with the specified name, organization and description.
      Parameters:
      name - the name
      organization - the organization
      description - the description
    • JpaRole

      public JpaRole(String name, JpaOrganization organization, String description, Role.Type type)
      Constructs a role with the specified name, organization and description.
      Parameters:
      name - the name
      organization - the organization
      description - the description
      type - the role Role.Type
  • Method Details

    • getId

      public Long getId()
      Gets the identifier.
      Returns:
      the identifier
    • getName

      public String getName()
      Description copied from interface: Role
      Gets the role name
      Specified by:
      getName in interface Role
      Returns:
      the role name
    • getDescription

      public String getDescription()
      Description copied from interface: Role
      Gets the role description
      Specified by:
      getDescription in interface Role
      Returns:
      the role description
    • setDescription

      public void setDescription(String description)
      Sets the description
      Parameters:
      description - the description
    • getOrganizationId

      public String getOrganizationId()
      Description copied from interface: Role
      Returns the role's organization identifier.
      Specified by:
      getOrganizationId in interface Role
      Returns:
      the organization identifier
    • getJpaOrganization

      public JpaOrganization getJpaOrganization()
    • getType

      public Role.Type getType()
      Description copied from interface: Role
      Returns the role's Role.Type
      Specified by:
      getType in interface Role
      Returns:
      the type
    • hashCode

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

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

      public String toString()
      Overrides:
      toString in class Object