org.keycloak.connections.mongo.api

## Interface MongoStore

- All Known Implementing Classes:
    MongoStoreImpl

      public interface MongoStore

  Author:
    Marek Posolda

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T extends MongoIdentifiableEntity> int` | `countEntities(Class<T> type, com.mongodb.DBObject query, MongoStoreInvocationContext context)`
    `void` | `insertEntity(MongoIdentifiableEntity entity, MongoStoreInvocationContext context)` Insert new entity
    `<T extends MongoIdentifiableEntity> List<T>` | `loadEntities(Class<T> type, com.mongodb.DBObject query, com.mongodb.DBObject sort, int firstResult, int maxResults, MongoStoreInvocationContext context)`
    `<T extends MongoIdentifiableEntity> List<T>` | `loadEntities(Class<T> type, com.mongodb.DBObject query, MongoStoreInvocationContext context)`
    `<T extends MongoIdentifiableEntity> T` | `loadEntity(Class<T> type, String id, MongoStoreInvocationContext context)`
    `<T extends MongoIdentifiableEntity> T` | `loadSingleEntity(Class<T> type, com.mongodb.DBObject query, MongoStoreInvocationContext context)`
    `<S> boolean` | `pullItemFromList(MongoIdentifiableEntity entity, String listPropertyName, S itemToPull, MongoStoreInvocationContext context)`
    `<S> boolean` | `pushItemToList(MongoIdentifiableEntity entity, String listPropertyName, S itemToPush, boolean skipIfAlreadyPresent, MongoStoreInvocationContext context)`
    `boolean` | `removeEntities(Class<? extends MongoIdentifiableEntity> type, com.mongodb.DBObject query, MongoStoreInvocationContext context)`
    `boolean` | `removeEntity(Class<? extends MongoIdentifiableEntity> type, String id, MongoStoreInvocationContext context)`
    `boolean` | `removeEntity(MongoIdentifiableEntity entity, MongoStoreInvocationContext context)`
    `void` | `updateEntity(MongoIdentifiableEntity entity, MongoStoreInvocationContext context)` Update existing entity

- - ### Method Detail

    - #### insertEntity

          void insertEntity(MongoIdentifiableEntity entity,
                          MongoStoreInvocationContext context)

      Insert new entity
      Parameters:
        `entity` - to insert

    - #### updateEntity

          void updateEntity(MongoIdentifiableEntity entity,
                          MongoStoreInvocationContext context)

      Update existing entity
      Parameters:
        `entity` - to update

    - #### loadEntity

          <T extends MongoIdentifiableEntity> T loadEntity(Class<T> type,
                                                         String id,
                                                         MongoStoreInvocationContext context)

    - #### loadSingleEntity

          <T extends MongoIdentifiableEntity> T loadSingleEntity(Class<T> type,
                                                               com.mongodb.DBObject query,
                                                               MongoStoreInvocationContext context)

    - #### loadEntities

          <T extends MongoIdentifiableEntity> List<T> loadEntities(Class<T> type,
                                                                 com.mongodb.DBObject query,
                                                                 MongoStoreInvocationContext context)

    - #### loadEntities

          <T extends MongoIdentifiableEntity> List<T> loadEntities(Class<T> type,
                                                                 com.mongodb.DBObject query,
                                                                 com.mongodb.DBObject sort,
                                                                 int firstResult,
                                                                 int maxResults,
                                                                 MongoStoreInvocationContext context)

    - #### countEntities

          <T extends MongoIdentifiableEntity> int countEntities(Class<T> type,
                                                              com.mongodb.DBObject query,
                                                              MongoStoreInvocationContext context)

    - #### removeEntity

          boolean removeEntity(MongoIdentifiableEntity entity,
                             MongoStoreInvocationContext context)

    - #### removeEntity

          boolean removeEntity(Class<? extends MongoIdentifiableEntity> type,
                             String id,
                             MongoStoreInvocationContext context)

    - #### removeEntities

          boolean removeEntities(Class<? extends MongoIdentifiableEntity> type,
                               com.mongodb.DBObject query,
                               MongoStoreInvocationContext context)

    - #### pushItemToList

          <S> boolean pushItemToList(MongoIdentifiableEntity entity,
                                   String listPropertyName,
                                   S itemToPush,
                                   boolean skipIfAlreadyPresent,
                                   MongoStoreInvocationContext context)

    - #### pullItemFromList

          <S> boolean pullItemFromList(MongoIdentifiableEntity entity,
                                     String listPropertyName,
                                     S itemToPull,
                                     MongoStoreInvocationContext context)

Copyright © 2014. All Rights Reserved.