Package org.jdbi.v3.sqlobject
Interface HandlerFactory
- All Superinterfaces:
ExtensionHandlerFactory
@Deprecated(since="3.38.0",
forRemoval=true)
public interface HandlerFactory
extends ExtensionHandlerFactory
Deprecated, for removal: This API element is subject to removal in a future version.
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 booleanDeprecated, for removal: This API element is subject to removal in a future version.Determines whether the factory can create anExtensionHandlerfor combination of extension type and method.buildHandler(Class<?> sqlObjectType, Method method) Deprecated, for removal: This API element is subject to removal in a future version.Returns aHandlerinstance for executing the given SQL Object method.default Optional<ExtensionHandler> createExtensionHandler(Class<?> extensionType, Method method) Deprecated, for removal: This API element is subject to removal in a future version.Returns anExtensionHandlerinstance for a extension type and method combination.
-
Method Details
-
buildHandler
Deprecated, for removal: This API element is subject to removal in a future version.Returns aHandlerinstance for executing the given SQL Object method.- Parameters:
sqlObjectType- the SQL Object typemethod- the method- Returns:
- a handler, if applicable
-
accepts
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ExtensionHandlerFactoryDetermines whether the factory can create anExtensionHandlerfor combination of extension type and method.- Specified by:
acceptsin 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, for removal: This API element is subject to removal in a future version.Description copied from interface:ExtensionHandlerFactoryReturns anExtensionHandlerinstance for a extension type and method combination.- Specified by:
createExtensionHandlerin interfaceExtensionHandlerFactory- Parameters:
extensionType- The extension type classmethod- A method- Returns:
- An
ExtensionHandlerinstance 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()
-
ExtensionHandlerFactoryinstances directly.