-
Notifications
You must be signed in to change notification settings - Fork 32
/
mybatis-class-diagram.puml
98 lines (71 loc) · 2.13 KB
/
mybatis-class-diagram.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@startuml
interface SqlSessionFactory {
SqlSession openSession(X x);
ReactiveSqlSession openReactiveSession(X x);
}
interface SqlSession {
T selectOne(String statement);
List<E> selectList(String statement)
int update(String statement);
int insert(String statement);
int delete(String statement);
T getMapper(Class<T> type);
}
class DefaultSqlSession implements SqlSession {
Configuration configuration;
Executor executor;
}
interface ReactiveSqlSession #6CB43F {
T getMapper(Class<T> type);
}
class DefaultReactiveSqlSession #6CB43F implements ReactiveSqlSession {
Configuration configuration;
ReactiveExecutor executor;
}
interface ReactiveExecutor #6CB43F{
}
class SimpleReactiveExecutor #6CB43F implements ReactiveExecutor {
R2dbc r2dbc;
Configuration configuration;
}
class SqlSessionFactoryBuilder {
SqlSessionFactory build(Configuration config)
}
interface Executor {
}
class SimpleExecutor implements Executor {
Transaction transaction;
Configuration configuration;
}
class XMLConfigBuilder {
XMLConfigBuilder(InputStream inputStream, String environment);
Configuration parse();
}
class Configuration {
Map<String, MappedStatement> mappedStatements;
}
class MappedStatement {
String id;
SqlSource sqlSource;
ParameterMap parameterMap;
SqlCommandType sqlCommandType;
ResultSetType resultSetType;
}
interface XxxMapper {
T findById(Integer id);
}
interface ReactiveXxxMapper #6CB43F {
T findById(Integer id);
}
SqlSessionFactoryBuilder -up-> XMLConfigBuilder: configuration builder
XMLConfigBuilder --> Configuration: parse
SqlSessionFactoryBuilder -right-> Configuration: construct configuration \n from XML
Configuration --> MappedStatement
SqlSessionFactoryBuilder --> SqlSessionFactory: Build Factory \n from Configuration
SqlSessionFactory -right-> SqlSession: create session
SqlSessionFactory -left-> ReactiveSqlSession: create session
DefaultSqlSession -right-> Executor: executor
DefaultReactiveSqlSession -left-> ReactiveExecutor
SqlSession -right-> XxxMapper: get Mapper
ReactiveSqlSession -left-> ReactiveXxxMapper: get reactive Mapper
@enduml