org.keycloak.connections.mongo.impl.types

## Class EnumToStringMapper

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

- All Implemented Interfaces:
    Mapper<Enum,String>

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

  Author:
    Marek Posolda

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EnumToStringMapper()`

  - ### Method Summary

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

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

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

- - ### Constructor Detail

    - #### EnumToStringMapper

          public EnumToStringMapper()

  - ### Method Detail

    - #### convertObject

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

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

    - #### getTypeOfObjectToConvert

          public Class<? extends Enum> getTypeOfObjectToConvert()

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

    - #### getExpectedReturnType

          public Class<String> getExpectedReturnType()

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

Copyright © 2014. All Rights Reserved.