Class MapperBuilder<R,​T>

    • Method Detail

      • in

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

        public static <R,​T> MapperBuilder<R,​T> in​(java.util.function.Function<UserSession,​T> sessionExtractor)
      • 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.
      • collect

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

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

        public java.lang.String getKey()
      • getMappingFunction

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

        public java.lang.String getSaveTo()
      • getSessionExtractor

        public java.util.function.Function<UserSession,​T> getSessionExtractor()