org.keycloak.models.cache

## Class RoleAdapter

- java.lang.Object
- - org.keycloak.models.cache.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 RealmCache` | `cache`
    `protected CachedRole` | `cached`
    `protected CacheRealmProvider` | `cacheSession`
    `protected RealmModel` | `realm`
    `protected RoleModel` | `updated`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RoleAdapter(CachedRole cached, RealmCache cache, CacheRealmProvider session, RealmModel realm)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCompositeRole(RoleModel role)`
    `boolean` | `equals(Object o)`
    `Set<RoleModel>` | `getComposites()`
    `RoleContainerModel` | `getContainer()`
    `protected void` | `getDelegateForUpdate()`
    `String` | `getDescription()`
    `String` | `getId()`
    `String` | `getName()`
    `int` | `hashCode()`
    `boolean` | `hasRole(RoleModel role)`
    `boolean` | `isComposite()`
    `void` | `removeCompositeRole(RoleModel role)`
    `void` | `setDescription(String description)`
    `void` | `setName(String name)`

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

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

- - ### Field Detail

    - #### updated

          protected RoleModel updated

    - #### cached

          protected CachedRole cached

    - #### cache

          protected RealmCache cache

    - #### cacheSession

          protected CacheRealmProvider cacheSession

    - #### realm

          protected RealmModel realm

  - ### Constructor Detail

    - #### RoleAdapter

          public RoleAdapter(CachedRole cached,
                     RealmCache cache,
                     CacheRealmProvider session,
                     RealmModel realm)

  - ### Method Detail

    - #### getDelegateForUpdate

          protected void getDelegateForUpdate()

    - #### 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`

    - #### getContainer

          public RoleContainerModel getContainer()

      Specified by:
        `getContainer` in interface `RoleModel`

    - #### hasRole

          public boolean hasRole(RoleModel role)

      Specified by:
        `hasRole` in interface `RoleModel`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2015. All rights reserved.