org.keycloak.models.mongo.impl.context

## Class SimpleMongoStoreInvocationContext

- java.lang.Object
- - org.keycloak.models.mongo.impl.context.SimpleMongoStoreInvocationContext

- All Implemented Interfaces:
    MongoStoreInvocationContext

      public class SimpleMongoStoreInvocationContext
      extends Object
      implements MongoStoreInvocationContext

  Context, which is not doing any postponing of tasks and does not cache anything
  Author:
    Marek Posolda

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleMongoStoreInvocationContext(MongoStore mongoStore)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCreatedEntity(MongoIdentifiableEntity entity)`
    `void` | `addLoadedEntity(MongoIdentifiableEntity entity)`
    `void` | `addRemovedEntity(MongoIdentifiableEntity entity)`
    `void` | `addUpdateTask(MongoIdentifiableEntity entityToUpdate, MongoTask task)`
    `void` | `beforeDBSearch(Class<? extends MongoIdentifiableEntity> entityType)`
    `void` | `begin()`
    `void` | `commit()`
    `<T extends MongoIdentifiableEntity> T` | `getLoadedEntity(Class<T> type, String id)`
    `MongoStore` | `getMongoStore()`
    `void` | `rollback()`

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

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

- - ### Constructor Detail

    - #### SimpleMongoStoreInvocationContext

          public SimpleMongoStoreInvocationContext(MongoStore mongoStore)

  - ### Method Detail

    - #### addCreatedEntity

          public void addCreatedEntity(MongoIdentifiableEntity entity)

      Specified by:
        `addCreatedEntity` in interface `MongoStoreInvocationContext`

    - #### addLoadedEntity

          public void addLoadedEntity(MongoIdentifiableEntity entity)

      Specified by:
        `addLoadedEntity` in interface `MongoStoreInvocationContext`

    - #### getLoadedEntity

          public <T extends MongoIdentifiableEntity> T getLoadedEntity(Class<T> type,
                                                              String id)

      Specified by:
        `getLoadedEntity` in interface `MongoStoreInvocationContext`

    - #### addUpdateTask

          public void addUpdateTask(MongoIdentifiableEntity entityToUpdate,
                           MongoTask task)

      Specified by:
        `addUpdateTask` in interface `MongoStoreInvocationContext`

    - #### addRemovedEntity

          public void addRemovedEntity(MongoIdentifiableEntity entity)

      Specified by:
        `addRemovedEntity` in interface `MongoStoreInvocationContext`

    - #### beforeDBSearch

          public void beforeDBSearch(Class<? extends MongoIdentifiableEntity> entityType)

      Specified by:
        `beforeDBSearch` in interface `MongoStoreInvocationContext`

    - #### begin

          public void begin()

      Specified by:
        `begin` in interface `MongoStoreInvocationContext`

    - #### commit

          public void commit()

      Specified by:
        `commit` in interface `MongoStoreInvocationContext`

    - #### rollback

          public void rollback()

      Specified by:
        `rollback` in interface `MongoStoreInvocationContext`

    - #### getMongoStore

          public MongoStore getMongoStore()

      Specified by:
        `getMongoStore` in interface `MongoStoreInvocationContext`

Copyright © 2014. All Rights Reserved.