Interface HandlerFactory

All Superinterfaces:
ExtensionHandlerFactory

@Deprecated public interface HandlerFactory extends ExtensionHandlerFactory
Deprecated.
Use ExtensionHandlerFactory instances directly.
Creates Handler objects for methods annotated with a specific SQL method annotation, which satisfy the contract of that annotation.
See Also:
  • Method Details

    • buildHandler

      Optional<Handler> buildHandler(Class<?> sqlObjectType, Method method)
      Deprecated.
      Returns a Handler instance for executing the given SQL Object method.
      Parameters:
      sqlObjectType - the SQL Object type
      method - the method
      Returns:
      a handler, if applicable
    • accepts

      default boolean accepts(Class<?> extensionType, Method method)
      Deprecated.
      Description copied from interface: ExtensionHandlerFactory
      Determines whether the factory can create an ExtensionHandler for combination of extension type and method.
      Specified by:
      accepts in interface ExtensionHandlerFactory
      Parameters:
      extensionType - The extension type class
      method - A method
      Returns:
      True if the factory can create an extension handler for extension type and method, false otherwise
    • createExtensionHandler

      default Optional<ExtensionHandler> createExtensionHandler(Class<?> extensionType, Method method)
      Deprecated.
      Description copied from interface: ExtensionHandlerFactory
      Returns an ExtensionHandler instance for a extension type and method combination.
      Specified by:
      createExtensionHandler in interface ExtensionHandlerFactory
      Parameters:
      extensionType - The extension type class
      method - A method
      Returns:
      An ExtensionHandler instance wrapped into an Optional. The optional can be empty. This is necessary to retrofit old code that does not have an accept/build code pair but unconditionally tries to build a handler and returns empty if it can not. New code should always return Optional.of(extensionHandler} and never return Optional.empty()