Class MapperAnnotationBuilder
java.lang.Object
org.apache.ibatis.builder.annotation.MapperAnnotationBuilder
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MapperBuilderAssistant
private final Configuration
private static final Set
<Class<? extends Annotation>> private final Class
<?> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
applyConstructorArgs
(Arg[] args, Class<?> resultType, List<ResultMapping> resultMappings) private Discriminator
applyDiscriminator
(String resultMapId, Class<?> resultType, TypeDiscriminator discriminator) private void
applyResultMap
(String resultMapId, Class<?> returnType, Arg[] args, Result[] results, TypeDiscriminator discriminator) private void
applyResults
(Result[] results, Class<?> resultType, List<ResultMapping> resultMappings) private SqlSource
buildSqlSource
(Annotation annotation, Class<?> parameterType, LanguageDriver languageDriver, Method method) private SqlSource
buildSqlSourceFromStrings
(String[] strings, Class<?> parameterTypeClass, LanguageDriver languageDriver) private boolean
canHaveStatement
(Method method) private Properties
convertToProperties
(Property[] properties) private void
createDiscriminatorResultMaps
(String resultMapId, Class<?> resultType, TypeDiscriminator discriminator) private String
findColumnPrefix
(Result result) private String
generateResultMapName
(Method method) private final Optional
<MapperAnnotationBuilder.AnnotationWrapper> getAnnotationWrapper
(Method method, boolean errorIfNoMatch, Class<? extends Annotation>... targetTypes) getAnnotationWrapper
(Method method, boolean errorIfNoMatch, Collection<Class<? extends Annotation>> targetTypes) private LanguageDriver
getLanguageDriver
(Method method) private Class
<?> getParameterType
(Method method) private Class
<?> getReturnType
(Method method) private KeyGenerator
handleSelectKeyAnnotation
(SelectKey selectKeyAnnotation, String baseStatementId, Class<?> parameterTypeClass, LanguageDriver languageDriver) private boolean
hasNestedResultMap
(Result result) private boolean
hasNestedSelect
(Result result) private boolean
private void
private String
nestedResultMapId
(Result result) private String
nestedSelectId
(Result result) private String
nullOrEmpty
(String value) void
parse()
private void
private void
private void
private String
parseResultMap
(Method method) (package private) void
parseStatement
(Method method)
-
Field Details
-
statementAnnotationTypes
-
configuration
-
assistant
-
type
-
-
Constructor Details
-
MapperAnnotationBuilder
-
-
Method Details
-
parse
public void parse() -
canHaveStatement
-
parsePendingMethods
private void parsePendingMethods() -
loadXmlResource
private void loadXmlResource() -
parseCache
private void parseCache() -
convertToProperties
-
parseCacheRef
private void parseCacheRef() -
parseResultMap
-
generateResultMapName
-
applyResultMap
private void applyResultMap(String resultMapId, Class<?> returnType, Arg[] args, Result[] results, TypeDiscriminator discriminator) -
createDiscriminatorResultMaps
private void createDiscriminatorResultMaps(String resultMapId, Class<?> resultType, TypeDiscriminator discriminator) -
applyDiscriminator
private Discriminator applyDiscriminator(String resultMapId, Class<?> resultType, TypeDiscriminator discriminator) -
parseStatement
-
getLanguageDriver
-
getParameterType
-
getReturnType
-
applyResults
private void applyResults(Result[] results, Class<?> resultType, List<ResultMapping> resultMappings) -
findColumnPrefix
-
nestedResultMapId
-
hasNestedResultMap
-
nestedSelectId
-
isLazy
-
hasNestedSelect
-
applyConstructorArgs
private void applyConstructorArgs(Arg[] args, Class<?> resultType, List<ResultMapping> resultMappings) -
nullOrEmpty
-
handleSelectKeyAnnotation
private KeyGenerator handleSelectKeyAnnotation(SelectKey selectKeyAnnotation, String baseStatementId, Class<?> parameterTypeClass, LanguageDriver languageDriver) -
buildSqlSource
private SqlSource buildSqlSource(Annotation annotation, Class<?> parameterType, LanguageDriver languageDriver, Method method) -
buildSqlSourceFromStrings
private SqlSource buildSqlSourceFromStrings(String[] strings, Class<?> parameterTypeClass, LanguageDriver languageDriver) -
getAnnotationWrapper
@SafeVarargs private final Optional<MapperAnnotationBuilder.AnnotationWrapper> getAnnotationWrapper(Method method, boolean errorIfNoMatch, Class<? extends Annotation>... targetTypes) -
getAnnotationWrapper
private Optional<MapperAnnotationBuilder.AnnotationWrapper> getAnnotationWrapper(Method method, boolean errorIfNoMatch, Collection<Class<? extends Annotation>> targetTypes)
-