Skip to content

Commit 3d3de73

Browse files
authored
Merge pull request #984 from zekaryu/master
Update sqlmap-xml.xml, add Chinese translation
2 parents 151e90e + 6e74acf commit 3d3de73

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/site/zh/xdoc/sqlmap-xml.xml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -982,8 +982,8 @@ jdbcType
982982
}]]></source>
983983

984984
<p>
985-
In order to inject the results into the constructor, MyBatis needs to identify the constructor for somehow.
986-
In the following example, MyBatis searches a constructor declared with three parameters: <code>java.lang.Integer</code>, <code>java.lang.String</code> and <code>int</code> in this order.
985+
为了将结果注入构造方法,MyBatis需要通过某种方式定位相应的构造方法。
986+
在下面的例子中,MyBatis搜索一个声明了三个形参的的构造方法,以 <code>java.lang.Integer</code>, <code>java.lang.String</code> and <code>int</code> 的顺序排列。
987987
</p>
988988

989989
<source><![CDATA[<constructor>
@@ -993,9 +993,8 @@ jdbcType
993993
</constructor>]]></source>
994994

995995
<p>
996-
When you are dealing with a constructor with many parameters, maintaining the order of arg elements is error-prone.<br />
997-
Since 3.4.3, by specifying the name of each parameter, you can write arg elements in any order. To reference constructor parameters by their names, you can either add <code>@Param</code> annotation to them or compile the project with '-parameters' compiler option and enable <code>useActualParamName</code> (this option is enabled by default).
998-
The following example is valid for the same constructor even though the order of the second and the third parameters does not match with the declared order.
996+
当你在处理一个带有多个形参的构造方法时,对arg元素顺序的维持是很容易出错的。为了能利用构造方法形参的name来对形参进行引用,你可以添加 <code>@Param</code> 注解或者使用'-parameters'编译选项和启用 <code>useActualParamName</code> (此选项默认开启)来编译工程。
997+
下面的例子对于同一个构造方法依然是有效的,尽管第二和第三个形参顺序与构造方法中声明的顺序不匹配。
999998
</p>
1000999

10011000
<source><![CDATA[<constructor>
@@ -1005,7 +1004,7 @@ jdbcType
10051004
</constructor>]]></source>
10061005

10071006
<p>
1008-
<code>javaType</code> can be omitted if there is a property with the same name and type.
1007+
如果存在具有同名和相同类型的属性,那么它的 <code>javaType</code> 可以省略。
10091008
</p>
10101009

10111010
<p>
@@ -1071,7 +1070,7 @@ jdbcType
10711070
<tr>
10721071
<td><code>name</code></td>
10731072
<td>
1074-
The name of the constructor parameter. Specifying name allows you to write arg elements in any order. See the above explanation. Since 3.4.3.
1073+
构造方法形参的名字。通过指定具体的名字你可以以任意顺序写入arg元素。参看上面的解释。从3.4.3版本起。
10751074
</td>
10761075
</tr>
10771076
</tbody>
@@ -1898,9 +1897,7 @@ org.mybatis.cache.Cache 接口。这个接口是 MyBatis 框架中很多复杂
18981897
</p>
18991898

19001899
<p>
1901-
Since 3.4.2, the MyBatis has been supported to call an initialization method after it's set all properties.
1902-
If you want to use this feature, please implements the <code>org.apache.ibatis.builder.InitializingObject</code>
1903-
interface on your custom cache class.
1900+
从3.4.2版本开始,MyBatis已经支持在所有属性设置完毕以后可以调用一个初始化方法。如果你想要使用这个特性,请在你的自定义缓存类里实现 <code>org.apache.ibatis.builder.InitializingObject</code> 接口。
19041901
</p>
19051902

19061903
<source><![CDATA[public interface InitializingObject {

0 commit comments

Comments
 (0)