org.keycloak.models.jpa

## Class RoleAdapter

- java.lang.Object
- - org.keycloak.models.jpa.RoleAdapter

- All Implemented Interfaces:
    RoleModel

      public class RoleAdapter
      extends Object
      implements RoleModel

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected javax.persistence.EntityManager` | `em`
    `protected RealmModel` | `realm`
    `protected RoleEntity` | `role`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RoleAdapter(RealmModel realm, javax.persistence.EntityManager em, RoleEntity role)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCompositeRole(RoleModel role)`
    `boolean` | `equals(Object o)`
    `Set<RoleModel>` | `getComposites()`
    `RoleContainerModel` | `getContainer()`
    `String` | `getDescription()`
    `String` | `getId()`
    `String` | `getName()`
    `RoleEntity` | `getRole()`
    `int` | `hashCode()`
    `boolean` | `hasRole(RoleModel role)`
    `boolean` | `isComposite()`
    `void` | `removeCompositeRole(RoleModel role)`
    `void` | `setDescription(String description)`
    `void` | `setName(String name)`
    `void` | `setRole(RoleEntity role)`
    `static RoleEntity` | `toRoleEntity(RoleModel model, javax.persistence.EntityManager em)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### role

          protected RoleEntity role

    - #### em

          protected javax.persistence.EntityManager em

    - #### realm

          protected RealmModel realm

  - ### Constructor Detail

    - #### RoleAdapter

          public RoleAdapter(RealmModel realm,
                     javax.persistence.EntityManager em,
                     RoleEntity role)

  - ### Method Detail

    - #### getRole

          public RoleEntity getRole()

    - #### setRole

          public void setRole(RoleEntity role)

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `RoleModel`

    - #### getDescription

          public String getDescription()

      Specified by:
        `getDescription` in interface `RoleModel`

    - #### setDescription

          public void setDescription(String description)

      Specified by:
        `setDescription` in interface `RoleModel`

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `RoleModel`

    - #### setName

          public void setName(String name)

      Specified by:
        `setName` in interface `RoleModel`

    - #### isComposite

          public boolean isComposite()

      Specified by:
        `isComposite` in interface `RoleModel`

    - #### addCompositeRole

          public void addCompositeRole(RoleModel role)

      Specified by:
        `addCompositeRole` in interface `RoleModel`

    - #### removeCompositeRole

          public void removeCompositeRole(RoleModel role)

      Specified by:
        `removeCompositeRole` in interface `RoleModel`

    - #### getComposites

          public Set<RoleModel> getComposites()

      Specified by:
        `getComposites` in interface `RoleModel`

    - #### hasRole

          public boolean hasRole(RoleModel role)

      Specified by:
        `hasRole` in interface `RoleModel`

    - #### getContainer

          public RoleContainerModel getContainer()

      Specified by:
        `getContainer` in interface `RoleModel`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toRoleEntity

          public static RoleEntity toRoleEntity(RoleModel model,
                                javax.persistence.EntityManager em)

Copyright © 2014. All Rights Reserved.