Package org.jdbi.v3.sqlobject
Interface HandlerFactory
- All Superinterfaces:
ExtensionHandlerFactory
Deprecated.
Creates Handler objects for methods annotated with a specific SQL method annotation, which satisfy the contract of
that annotation.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Deprecated.Determines whether the factory can create anExtensionHandler
for combination of extension type and method.buildHandler
(Class<?> sqlObjectType, Method method) Deprecated.Returns aHandler
instance for executing the given SQL Object method.default Optional
<ExtensionHandler> createExtensionHandler
(Class<?> extensionType, Method method) Deprecated.Returns anExtensionHandler
instance for a extension type and method combination.
-
Method Details
-
buildHandler
Deprecated.Returns aHandler
instance for executing the given SQL Object method.- Parameters:
sqlObjectType
- the SQL Object typemethod
- the method- Returns:
- a handler, if applicable
-
accepts
Deprecated.Description copied from interface:ExtensionHandlerFactory
Determines whether the factory can create anExtensionHandler
for combination of extension type and method.- Specified by:
accepts
in interfaceExtensionHandlerFactory
- Parameters:
extensionType
- The extension type classmethod
- A method- Returns:
- True if the factory can create an extension handler for extension type and method, false otherwise
-
createExtensionHandler
Deprecated.Description copied from interface:ExtensionHandlerFactory
Returns anExtensionHandler
instance for a extension type and method combination.- Specified by:
createExtensionHandler
in interfaceExtensionHandlerFactory
- Parameters:
extensionType
- The extension type classmethod
- A method- Returns:
- An
ExtensionHandler
instance wrapped into anOptional
. 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 returnOptional.of(extensionHandler}
and never returnOptional.empty()
-
ExtensionHandlerFactory
instances directly.