Class CustomizingStatementHandler<StatementType extends SqlStatement<StatementType>>

    • Field Detail

      • sqlObjectType

        private final java.lang.Class<?> sqlObjectType
      • method

        private final java.lang.reflect.Method method
    • Constructor Detail

      • CustomizingStatementHandler

        CustomizingStatementHandler​(java.lang.Class<?> type,
                                    java.lang.reflect.Method method)
    • Method Detail

      • warm

        public void warm​(ConfigRegistry config)
        Description copied from interface: ExtensionHandler
        Called after the method handler is constructed to pre-initialize any important configuration data structures.
        Specified by:
        warm in interface ExtensionHandler
        Parameters:
        config - the method configuration to use for warming up
      • annotationsFor

        private static java.util.stream.Stream<java.lang.annotation.Annotation> annotationsFor​(java.lang.reflect.AnnotatedElement... elements)
      • defaultParameterCustomizer

        private CustomizingStatementHandler.BoundCustomizer defaultParameterCustomizer​(java.lang.reflect.Parameter parameter,
                                                                                       java.lang.Integer i)
        Default parameter customizer for parameters with no annotations.
      • getParameterType

        java.lang.reflect.Type getParameterType​(java.lang.reflect.Parameter parameter)
      • invoke

        public java.lang.Object invoke​(HandleSupplier handleSupplier,
                                       java.lang.Object target,
                                       java.lang.Object... args)
        Description copied from interface: ExtensionHandler
        Gets invoked to return a value for the method that this handler was bound to.
        Specified by:
        invoke in interface ExtensionHandler
        Parameters:
        handleSupplier - A HandleSupplier instance for accessing the handle and its related objects
        target - The target object on which the handler should operate
        args - Optional arguments for the handler
        Returns:
        The return value for the method that was bound to the extension handler. Can be null
      • applyCustomizers

        void applyCustomizers​(StatementType stmt,
                              java.lang.Object[] args)
      • createStatement

        abstract StatementType createStatement​(Handle handle,
                                               java.lang.String locatedSql)
      • locateSql

        java.lang.String locateSql​(Handle h)
      • getMethod

        java.lang.reflect.Method getMethod()