Class ProviderSqlSource
java.lang.Object
org.apache.ibatis.builder.annotation.ProviderSqlSource
- All Implemented Interfaces:
SqlSource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Configuration
private final LanguageDriver
private final Method
private final ProviderContext
private final Integer
private final Method
private final String[]
private final Class<?>[]
private final Class<?>
-
Constructor Summary
ConstructorsConstructorDescriptionProviderSqlSource
(Configuration configuration, Annotation provider, Class<?> mapperType, Method mapperMethod) Instantiates a new provider sql source.ProviderSqlSource
(Configuration configuration, Object provider) Deprecated.ProviderSqlSource
(Configuration configuration, Object provider, Class<?> mapperType, Method mapperMethod) Deprecated.Since 3.5.3, Please use theProviderSqlSource(Configuration, Annotation, Class, Method)
instead of this. -
Method Summary
Modifier and TypeMethodDescriptionprivate SqlSource
createSqlSource
(Object parameterObject) private Object[]
extractProviderMethodArguments
(Object parameterObject) private Object[]
extractProviderMethodArguments
(Map<String, Object> params, String[] argumentNames) private Throwable
getBoundSql
(Object parameterObject) private Class<?>
getProviderType
(Configuration configuration, Annotation providerAnnotation, Method mapperMethod) private String
invokeProviderMethod
(Object... args)
-
Field Details
-
configuration
-
providerType
-
languageDriver
-
mapperMethod
-
providerMethod
-
providerMethodArgumentNames
-
providerMethodParameterTypes
-
providerContext
-
providerContextIndex
-
-
Constructor Details
-
ProviderSqlSource
Deprecated.Since 3.5.3, Please use theProviderSqlSource(Configuration, Annotation, Class, Method)
instead of this.This constructor will remove at a future version.- Parameters:
configuration
- the configurationprovider
- the provider
-
ProviderSqlSource
@Deprecated public ProviderSqlSource(Configuration configuration, Object provider, Class<?> mapperType, Method mapperMethod) Deprecated.Since 3.5.3, Please use theProviderSqlSource(Configuration, Annotation, Class, Method)
instead of this.This constructor will remove at a future version.- Parameters:
configuration
- the configurationprovider
- the providermapperType
- the mapper typemapperMethod
- the mapper method- Since:
- 3.4.5
-
ProviderSqlSource
public ProviderSqlSource(Configuration configuration, Annotation provider, Class<?> mapperType, Method mapperMethod) Instantiates a new provider sql source.- Parameters:
configuration
- the configurationprovider
- the providermapperType
- the mapper typemapperMethod
- the mapper method- Since:
- 3.5.3
-
-
Method Details
-
getBoundSql
- Specified by:
getBoundSql
in interfaceSqlSource
-
createSqlSource
-
extractRootCause
-
extractProviderMethodArguments
-
extractProviderMethodArguments
-
invokeProviderMethod
- Throws:
Exception
-
getProviderType
private Class<?> getProviderType(Configuration configuration, Annotation providerAnnotation, Method mapperMethod) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException
-
ProviderSqlSource(Configuration, Annotation, Class, Method)
instead of this.