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,
37 Discriminator discriminator, List<ResultMapping> resultMappings, Boolean autoMapping) {
38 this.assistant = assistant;
39 this.id = id;
40 this.type = type;
41 this.extend = extend;
42 this.discriminator = discriminator;
43 this.resultMappings = resultMappings;
44 this.autoMapping = autoMapping;
45 }
46
47 public ResultMap resolve() {
48 return assistant.addResultMap(this.id, this.type, this.extend, this.discriminator, this.resultMappings,
49 this.autoMapping);
50 }
51
52 }