1
1
/**
2
- * Copyright 2015-2017 the original author or authors.
2
+ * Copyright 2015-2018 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
35
35
import org .apache .ibatis .session .Configuration ;
36
36
37
37
/**
38
- * Adds FreeMarker templates support to scripting in MyBatis.
39
- * If you want to change or extend template loader configuration, use can
40
- * inherit from this class and override {@link #createFreeMarkerConfiguration()} method.
38
+ * Adds FreeMarker templates support to scripting in MyBatis. If you want to change or extend template loader
39
+ * configuration, use can inherit from this class and override {@link #createFreeMarkerConfiguration()} method.
41
40
*
42
41
* @author elwood
43
42
*/
@@ -73,10 +72,8 @@ public FreeMarkerLanguageDriver() {
73
72
}
74
73
75
74
/**
76
- * Creates the {@link freemarker.template.Configuration} instance
77
- * and sets it up. If you want to change it (set another props, for
78
- * example), you can override it in inherited class and use your own
79
- * class in @Lang directive.
75
+ * Creates the {@link freemarker.template.Configuration} instance and sets it up. If you want to change it (set
76
+ * another props, for example), you can override it in inherited class and use your own class in @Lang directive.
80
77
*/
81
78
protected freemarker .template .Configuration createFreeMarkerConfiguration () {
82
79
freemarker .template .Configuration cfg = new freemarker .template .Configuration (
@@ -95,13 +92,15 @@ protected freemarker.template.Configuration createFreeMarkerConfiguration() {
95
92
}
96
93
97
94
/**
98
- * Creates a {@link ParameterHandler} that passes the actual parameters
99
- * to the the JDBC statement.
95
+ * Creates a {@link ParameterHandler} that passes the actual parameters to the the JDBC statement.
100
96
*
101
97
* @see DefaultParameterHandler
102
- * @param mappedStatement The mapped statement that is being executed
103
- * @param parameterObject The input parameter object (can be null)
104
- * @param boundSql The resulting SQL once the dynamic language has been executed.
98
+ * @param mappedStatement
99
+ * The mapped statement that is being executed
100
+ * @param parameterObject
101
+ * The input parameter object (can be null)
102
+ * @param boundSql
103
+ * The resulting SQL once the dynamic language has been executed.
105
104
*/
106
105
@ Override
107
106
public ParameterHandler createParameterHandler (MappedStatement mappedStatement , Object parameterObject ,
@@ -111,29 +110,33 @@ public ParameterHandler createParameterHandler(MappedStatement mappedStatement,
111
110
}
112
111
113
112
/**
114
- * Creates an {@link SqlSource} that will hold the statement read
115
- * from a mapper xml file. It is called during startup, when the
116
- * mapped statement is read from a class or an xml file.
113
+ * Creates an {@link SqlSource} that will hold the statement read from a mapper xml file. It is called during startup,
114
+ * when the mapped statement is read from a class or an xml file.
117
115
*
118
- * @param configuration The MyBatis configuration
119
- * @param script XNode parsed from a XML file
120
- * @param parameterType input parameter type got from a mapper method
121
- * or specified in the parameterType xml attribute. Can be null.
116
+ * @param configuration
117
+ * The MyBatis configuration
118
+ * @param script
119
+ * XNode parsed from a XML file
120
+ * @param parameterType
121
+ * input parameter type got from a mapper method or specified in the parameterType xml attribute. Can be
122
+ * null.
122
123
*/
123
124
@ Override
124
125
public SqlSource createSqlSource (Configuration configuration , XNode script , Class <?> parameterType ) {
125
126
return createSqlSource (configuration , script .getNode ().getTextContent ());
126
127
}
127
128
128
129
/**
129
- * Creates an {@link SqlSource} that will hold the statement read
130
- * from an annotation. It is called during startup, when the mapped
131
- * statement is read from a class or an xml file.
130
+ * Creates an {@link SqlSource} that will hold the statement read from an annotation. It is called during startup,
131
+ * when the mapped statement is read from a class or an xml file.
132
132
*
133
- * @param configuration The MyBatis configuration
134
- * @param script The content of the annotation
135
- * @param parameterType input parameter type got from a mapper method
136
- * or specified in the parameterType xml attribute. Can be null.
133
+ * @param configuration
134
+ * The MyBatis configuration
135
+ * @param script
136
+ * The content of the annotation
137
+ * @param parameterType
138
+ * input parameter type got from a mapper method or specified in the parameterType xml attribute. Can be
139
+ * null.
137
140
*/
138
141
@ Override
139
142
public SqlSource createSqlSource (Configuration configuration , String script , Class <?> parameterType ) {
0 commit comments