Class ProviderSqlSource
java.lang.Object
org.apache.ibatis.builder.annotation.ProviderSqlSource
- All Implemented Interfaces:
SqlSource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Configurationprivate final LanguageDriverprivate final Methodprivate final ProviderContextprivate final Integerprivate final Methodprivate 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 SqlSourcecreateSqlSource(Object parameterObject) private Object[]extractProviderMethodArguments(Object parameterObject) private Object[]extractProviderMethodArguments(Map<String, Object> params, String[] argumentNames) private ThrowablegetBoundSql(Object parameterObject) private Class<?> getProviderType(Configuration configuration, Annotation providerAnnotation, Method mapperMethod) private StringinvokeProviderMethod(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:
getBoundSqlin 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.