Class JpaRole

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

@Entity public final class JpaRole extends Object implements org.opencastproject.security.api.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, org.opencastproject.security.api.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()
      Specified by:
      getName in interface org.opencastproject.security.api.Role
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface org.opencastproject.security.api.Role
    • setDescription

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

      public String getOrganizationId()
      Specified by:
      getOrganizationId in interface org.opencastproject.security.api.Role
    • getJpaOrganization

      public JpaOrganization getJpaOrganization()
    • getType

      public org.opencastproject.security.api.Role.Type getType()
      Specified by:
      getType in interface org.opencastproject.security.api.Role
    • 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