Class JdbcTemplateFactory

    • Method Detail

      • surround

        @SafeVarargs
        public static <T,​R> JdbcFunction<T,​R> surround​(JdbcFunction<T,​R> surroundedJdbcFunction,
                                                                   JdbcFunction.SurroundOperator<T,​R>... surroundings)
        Surrounds surroundedJdbcFunction with surroundings(by sequence).
        Type Parameters:
        T - The type of fed object
        R - The type of returned object
        Parameters:
        surroundedJdbcFunction - The function to be surrounded
        surroundings - The surrounding starts with outer block of syntax
        Returns:
        The surrounded function
        See Also:
        surround(JdbcFunction, SurroundingConfig)
      • surround

        public static <T,​R> JdbcFunction<T,​R> surround​(JdbcFunction<T,​R> surroundedJdbcFunction,
                                                                   SurroundingConfig<T,​R> surroundingConfig)
        Surrounds surroundedJdbcFunction with surroundings(by sequence).
        Type Parameters:
        T - The type of fed object
        R - The type of returned object
        Parameters:
        surroundedJdbcFunction - The function to be surrounded
        surroundingConfig - The lambda expression for configuring surrounding list(starts with outer block of syntax)
        Returns:
        The surrounded function
        See Also:
        surround(JdbcFunction, JdbcFunction.SurroundOperator...)
      • buildRunnable

        public static <T extends AutoCloseableJdbcRunnable buildRunnable​(JdbcSupplier<? extends T> supplier,
                                                                           JdbcVoidFunction<T> worker)
        Builds the runnable and work for JDBC operation.

        Type Parameters:
        T - The type of fed object
        Parameters:
        supplier - The supplier of fed object
        worker - The working code by fed object
        Returns:
        The instance of runnable function
      • buildRunnable

        public static <T extends AutoCloseableJdbcRunnable buildRunnable​(JdbcSupplier<? extends T> supplier,
                                                                           JdbcVoidFunction<T> worker,
                                                                           SurroundingConfig<T,​Void> surroundingConfig)
        Builds the runnable and work for JDBC operation.

        Type Parameters:
        T - The type of fed object
        Parameters:
        supplier - The supplier of fed object
        worker - The working code by fed object
        surroundingConfig - The lambda expression for configuring surrounding list(starts with outer block of syntax)
        Returns:
        The instance of runnable function
      • buildSupplier

        public static <T extends AutoCloseable,​R> JdbcSupplier<R> buildSupplier​(JdbcSupplier<? extends T> supplier,
                                                                                      JdbcFunction<T,​R> worker)
        Builds the supplier and work for JDBC operation.

        Type Parameters:
        T - The type of fed object
        R - The type of returned object
        Parameters:
        supplier - The supplier of fed object
        worker - The working code input as fed object
        Returns:
        The instance of result supplier function
      • buildSupplier

        public static <T extends AutoCloseable,​R> JdbcSupplier<R> buildSupplier​(JdbcSupplier<? extends T> supplier,
                                                                                      JdbcFunction<T,​R> worker,
                                                                                      SurroundingConfig<T,​R> surroundingConfig)
        Builds the supplier and work for JDBC operation.

        Type Parameters:
        T - The type of fed object
        R - The type of returned object
        Parameters:
        supplier - The supplier of fed object
        worker - The working code input as fed object
        surroundingConfig - The lambda expression for configuring surrounding list(starts with outer block of syntax)
        Returns:
        The instance of result supplier function