1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.ibatis.builder;
17
18 import java.util.List;
19
20 import org.apache.ibatis.mapping.Discriminator;
21 import org.apache.ibatis.mapping.ResultMap;
22 import org.apache.ibatis.mapping.ResultMapping;
23
24
25
26
27 public class ResultMapResolver {
28 private final MapperBuilderAssistant assistant;
29 private final String id;
30 private final Class<?> type;
31 private final String extend;
32 private final Discriminator discriminator;
33 private final List<ResultMapping> resultMappings;
34 private final Boolean autoMapping;
35
36 public ResultMapResolver(MapperBuilderAssistant assistant, String id, Class<?> type, String extend, Discriminator discriminator, List<ResultMapping> resultMappings, Boolean autoMapping) {
37 this.assistant = assistant;
38 this.id = id;
39 this.type = type;
40 this.extend = extend;
41 this.discriminator = discriminator;
42 this.resultMappings = resultMappings;
43 this.autoMapping = autoMapping;
44 }
45
46 public ResultMap resolve() {
47 return assistant.addResultMap(this.id, this.type, this.extend, this.discriminator, this.resultMappings, this.autoMapping);
48 }
49
50 }