org.keycloak.connections.mongo.impl.types

## Class MapMapper<T extends Map>

- java.lang.Object
- - org.keycloak.connections.mongo.impl.types.MapMapper<T>

- All Implemented Interfaces:
    Mapper<T,com.mongodb.BasicDBObject>

      public class MapMapper<T extends Map>
      extends Object
      implements Mapper<T,com.mongodb.BasicDBObject>

  For now, we support just convert from Map
  Author:
    Marek Posolda

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapMapper(Class<T> mapType)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.mongodb.BasicDBObject` | `convertObject(MapperContext<T,com.mongodb.BasicDBObject> context)` Convert object from one type to expected type
    `Class<com.mongodb.BasicDBObject>` | `getExpectedReturnType()`
    `Class<? extends T>` | `getTypeOfObjectToConvert()`

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

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

- - ### Constructor Detail

    - #### MapMapper

          public MapMapper(Class<T> mapType)

  - ### Method Detail

    - #### convertObject

          public com.mongodb.BasicDBObject convertObject(MapperContext<T,com.mongodb.BasicDBObject> context)

      Description copied from interface: `Mapper`
      Convert object from one type to expected type
      Specified by:
        `convertObject` in interface `Mapper<T extends Map,com.mongodb.BasicDBObject>`
      Parameters:
        `context` - Encapsulates reference to converted object and other things, which might be helpful in conversion
      Returns:
        converted object

    - #### getTypeOfObjectToConvert

          public Class<? extends T> getTypeOfObjectToConvert()

      Specified by:
        `getTypeOfObjectToConvert` in interface `Mapper<T extends Map,com.mongodb.BasicDBObject>`

    - #### getExpectedReturnType

          public Class<com.mongodb.BasicDBObject> getExpectedReturnType()

      Specified by:
        `getExpectedReturnType` in interface `Mapper<T extends Map,com.mongodb.BasicDBObject>`

Copyright © 2014. All Rights Reserved.