org.keycloak.connections.mongo.impl.types

## Class StringToEnumMapper

- java.lang.Object
- - org.keycloak.connections.mongo.impl.types.StringToEnumMapper

- All Implemented Interfaces:
    Mapper<String,Enum>

      public class StringToEnumMapper
      extends Object
      implements Mapper<String,Enum>

  Author:
    Marek Posolda

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StringToEnumMapper()`

  - ### Method Summary

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

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

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

- - ### Constructor Detail

    - #### StringToEnumMapper

          public StringToEnumMapper()

  - ### Method Detail

    - #### convertObject

          public Enum convertObject(MapperContext<String,Enum> context)

      Description copied from interface: `Mapper`
      Convert object from one type to expected type
      Specified by:
        `convertObject` in interface `Mapper<String,Enum>`
      Parameters:
        `context` - Encapsulates reference to converted object and other things, which might be helpful in conversion
      Returns:
        converted object

    - #### getTypeOfObjectToConvert

          public Class<? extends String> getTypeOfObjectToConvert()

      Specified by:
        `getTypeOfObjectToConvert` in interface `Mapper<String,Enum>`

    - #### getExpectedReturnType

          public Class<Enum> getExpectedReturnType()

      Specified by:
        `getExpectedReturnType` in interface `Mapper<String,Enum>`

Copyright © 2015. All Rights Reserved.