org.keycloak.models.mongo.keycloak.entities

## Class MongoUserEntity

- java.lang.Object
- - org.keycloak.models.entities.AbstractIdentifiableEntity
  - - org.keycloak.models.entities.UserEntity
    - - org.keycloak.models.mongo.keycloak.entities.MongoUserEntity

- All Implemented Interfaces:
    MongoEntity, MongoIdentifiableEntity

      @MongoCollection(collectionName="users")
      @MongoIndexes(value={@MongoIndex(fields={"realmId","loginName"},unique=true),@MongoIndex(fields="emailIndex",unique=true,sparse=true)})
      public class MongoUserEntity
      extends UserEntity
      implements MongoIdentifiableEntity

  Author:
    Marek Posolda

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MongoUserEntity()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterRemove(MongoStoreInvocationContext invocationContext)` Lifecycle callback, which is called after removal of this object from Mongo.
    `String` | `getEmailIndex()`
    `void` | `setEmailIndex(String ignored)`

    - ### Methods inherited from class org.keycloak.models.entities.UserEntity

      `getAttributes, getAuthenticationLink, getCredentials, getEmail, getFirstName, getLastName, getLoginName, getNotBefore, getRealmId, getRequiredActions, getRoleIds, getSocialLinks, isEmailVerified, isEnabled, isTotp, setAttributes, setAuthenticationLink, setCredentials, setEmail, setEmailVerified, setEnabled, setFirstName, setLastName, setLoginName, setNotBefore, setRealmId, setRequiredActions, setRoleIds, setSocialLinks, setTotp`

    - ### Methods inherited from class org.keycloak.models.entities.AbstractIdentifiableEntity

      `equals, getId, hashCode, setId, toString`

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

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

    - ### Methods inherited from interface org.keycloak.models.mongo.api.MongoIdentifiableEntity

      `getId, setId`

- - ### Constructor Detail

    - #### MongoUserEntity

          public MongoUserEntity()

  - ### Method Detail

    - #### getEmailIndex

          public String getEmailIndex()

    - #### setEmailIndex

          public void setEmailIndex(String ignored)

    - #### afterRemove

          public void afterRemove(MongoStoreInvocationContext invocationContext)

      Description copied from interface: `MongoIdentifiableEntity`
      Lifecycle callback, which is called after removal of this object from Mongo. It may be useful for triggering removal of wired objects.
      Specified by:
        `afterRemove` in interface `MongoIdentifiableEntity`

Copyright © 2014. All Rights Reserved.