org.keycloak.connections.mongo.api.types

## Interface Mapper<T,S>

- All Known Implementing Classes:
    BasicDBListMapper, BasicDBObjectMapper, BasicDBObjectToMapMapper, EnumToStringMapper, ListMapper, MapMapper, MongoEntityMapper, SimpleMapper, StringToEnumMapper

      public interface Mapper<T,S>

  SPI object to convert object from application type to database type and vice versa. Shouldn't be directly used by application. Various mappers should be registered in MapperRegistry, which is main entry point to be used by application
  Author:
    Marek Posolda

- - ### Method Summary

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

- - ### Method Detail

    - #### convertObject

          S convertObject(MapperContext<T,S> mapperContext)

      Convert object from one type to expected type
      Parameters:
        `mapperContext` - Encapsulates reference to converted object and other things, which might be helpful in conversion
      Returns:
        converted object

    - #### getTypeOfObjectToConvert

          Class<? extends T> getTypeOfObjectToConvert()

    - #### getExpectedReturnType

          Class<S> getExpectedReturnType()

Copyright © 2015. All Rights Reserved.