Class CustomizingStatementHandler<StatementType extends SqlStatement<StatementType>>
java.lang.Object
org.jdbi.v3.sqlobject.statement.internal.CustomizingStatementHandler<StatementType>
- All Implemented Interfaces:
ExtensionHandler
- Direct Known Subclasses:
SqlBatchHandler,SqlCallHandler,SqlQueryHandler,SqlScriptsHandler,SqlUpdateHandler
abstract class CustomizingStatementHandler<StatementType extends SqlStatement<StatementType>>
extends Object
implements ExtensionHandler
Base handler for annotations' implementation classes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interfaceASqlStatementCustomizerorSqlStatementParameterCustomizerthat is ready to apply. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Methodprivate final Class<?>private final List<CustomizingStatementHandler.BoundCustomizer>Fields inherited from interface org.jdbi.v3.core.extension.ExtensionHandler
EQUALS_HANDLER, HASHCODE_HANDLER, NULL_HANDLER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Stream<Annotation>annotationsFor(AnnotatedElement... elements) (package private) voidapplyCustomizers(StatementType stmt, Object[] args) (package private) abstract void(package private) abstract StatementTypecreateStatement(Handle handle, String locatedSql) defaultParameterCustomizer(Parameter parameter, Integer i) Default parameter customizer for parameters with no annotations.eachParameterCustomizers(Parameter parameter, Integer i) private static ParameterCustomizerFactory(package private) Method(package private) TypegetParameterType(Parameter parameter) private static SqlStatementCustomizerFactoryinstantiateFactory(Annotation annotation) invoke(HandleSupplier handleSupplier, Object target, Object... args) Gets invoked to return a value for the method that this handler was bound to.(package private) String(package private) static RowMapper<?>rowMapperFor(UseRowMapper annotation) (package private) static RowReducer<?,?> rowReducerFor(UseRowReducer annotation) voidwarm(ConfigRegistry config) Called after the method handler is constructed to pre-initialize any important configuration data structures.
-
Field Details
-
statementCustomizers
-
sqlObjectType
-
method
-
-
Constructor Details
-
CustomizingStatementHandler
-
-
Method Details
-
warm
Description copied from interface:ExtensionHandlerCalled after the method handler is constructed to pre-initialize any important configuration data structures.- Specified by:
warmin interfaceExtensionHandler- Parameters:
config- the method configuration to use for warming up
-
annotationsFor
-
parameterCustomizers
-
eachParameterCustomizers
private Stream<CustomizingStatementHandler.BoundCustomizer> eachParameterCustomizers(Parameter parameter, Integer i) -
defaultParameterCustomizer
private CustomizingStatementHandler.BoundCustomizer defaultParameterCustomizer(Parameter parameter, Integer i) Default parameter customizer for parameters with no annotations. -
getParameterType
-
getDefaultParameterCustomizerFactory
private static ParameterCustomizerFactory getDefaultParameterCustomizerFactory(ConfigRegistry config) -
instantiateFactory
-
invoke
Description copied from interface:ExtensionHandlerGets invoked to return a value for the method that this handler was bound to.- Specified by:
invokein interfaceExtensionHandler- Parameters:
handleSupplier- AHandleSupplierinstance for accessing the handle and its related objectstarget- The target object on which the handler should operateargs- Optional arguments for the handler- Returns:
- The return value for the method that was bound to the extension handler. Can be null
-
applyCustomizers
-
configureReturner
-
createStatement
-
locateSql
-
getMethod
Method getMethod() -
rowMapperFor
-
rowReducerFor
-