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","username"},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, getCredentials, getEmail, getFederationLink, getFirstName, getLastName, getRealmId, getRequiredActions, getRoleIds, getSocialLinks, getUsername, isEmailVerified, isEnabled, isTotp, setAttributes, setCredentials, setEmail, setEmailVerified, setEnabled, setFederationLink, setFirstName, setLastName, setRealmId, setRequiredActions, setRoleIds, setSocialLinks, setTotp, setUsername`

    - ### 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.connections.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.