Class MapperBuilder<R,​T>

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      MapperBuilder<R,​T> doMap​(java.util.function.Function<R,​T> mappingFunction)
      Use to provide a Function instance which will be applied to the input object and returns the target object.
      static <R,​T>
      MapperBuilder<R,​T>
      from​(java.lang.String sessionKey)
      Use the method to access the session object with the key, sessionKey.
      java.lang.String getKey()  
      java.util.function.Function<R,​T> getMappingFunction()  
      java.lang.String getSaveTo()  
      MapperBuilder<R,​T> saveTo​(java.lang.String sessionKey)
      After map function is applied, use this method to store the output object in the session.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • from

        public static <R,​T> MapperBuilder<R,​T> from​(java.lang.String sessionKey)
        Use the method to access the session object with the key, sessionKey.
        Type Parameters:
        R - The type of the session object.
        T - Target type to which the session object will be mapped.
        Parameters:
        sessionKey - The session key of the object being accessed.
        Returns:
        MapperBuilder instance.
      • doMap

        public MapperBuilder<R,​T> doMap​(java.util.function.Function<R,​T> mappingFunction)
        Use to provide a Function instance which will be applied to the input object and returns the target object.
        Parameters:
        mappingFunction - The function which is used to map the input object to the output.
        Returns:
        MapperBuilder instance.
      • saveTo

        public MapperBuilder<R,​T> saveTo​(java.lang.String sessionKey)
        After map function is applied, use this method to store the output object in the session.
        Parameters:
        sessionKey - Session key for the output instance.
        Returns:
        MapperBuilder instance.
      • getKey

        public java.lang.String getKey()
      • getMappingFunction

        public java.util.function.Function<R,​T> getMappingFunction()
      • getSaveTo

        public java.lang.String getSaveTo()