Skip to content

Commit ec0d1dd

Browse files
committed
Request changes update
1 parent 00e7732 commit ec0d1dd

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

src/site/xdoc/configuration.xml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
-->
1919
<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20-
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
20+
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
2121

2222
<properties>
2323
<title>MyBatis 3 | Configuration</title>
@@ -1583,19 +1583,19 @@ public class ExampleTypeHandler extends BaseTypeHandler<String> {
15831583
<li>Adding a <code>javaType</code> attribute to the typeHandler element (for example: <code>javaType="String"</code>)
15841584
</li>
15851585
<li>Adding a <code>@MappedTypes</code> annotation to your TypeHandler class specifying
1586-
the list of java types to associate it with. This annotation will be ignored if
1587-
the <code>javaType</code> attribute as also been specified.
1586+
the list of java types to associate it with. This annotation will be ignored if
1587+
the <code>javaType</code> attribute as also been specified.
15881588
</li>
15891589
</ul>
15901590

15911591
<p>The associated JDBC type can be specified by two means:</p>
15921592
<ul>
15931593
<li>
1594-
Adding a <code>jdbcType</code> attribute to the typeHandler element (for example: <code>jdbcType="VARCHAR"</code>).
1594+
Adding a <code>jdbcType</code> attribute to the typeHandler element (for example: <code>jdbcType="VARCHAR"</code>).
15951595
</li>
15961596
<li>Adding a <code>@MappedJdbcTypes</code> annotation to your TypeHandler class specifying
1597-
the list of JDBC types to associate it with. This annotation will be ignored if
1598-
the <code>jdbcType</code> attribute as also been specified.
1597+
the list of JDBC types to associate it with. This annotation will be ignored if
1598+
the <code>jdbcType</code> attribute as also been specified.
15991599
</li>
16001600
</ul>
16011601

@@ -1642,32 +1642,32 @@ public class GenericTypeHandler<E extends MyObject> extends BaseTypeHandler<E> {
16421642
]]></source>
16431643

16441644
<p><code>EnumTypeHandler</code> and <code>EnumOrdinalTypeHandler</code> are generic TypeHandlers. We will learn
1645-
about them in the following section.
1645+
about them in the following section.
16461646
</p>
16471647

16481648
</subsection>
16491649

16501650
<subsection name="Handling Enums">
1651-
<p>
1652-
If you want to map an <code>Enum</code>, you'll need to use either
1653-
<code>EnumTypeHandler</code> or <code>EnumOrdinalTypeHandler</code>.
1654-
</p>
1651+
<p>
1652+
If you want to map an <code>Enum</code>, you'll need to use either
1653+
<code>EnumTypeHandler</code> or <code>EnumOrdinalTypeHandler</code>.
1654+
</p>
16551655

1656-
<p>For example, let's say that we need to store the rounding mode that
1656+
<p>For example, let's say that we need to store the rounding mode that
16571657
should be used with some number if it needs to be rounded. By default, MyBatis
16581658
uses <code>EnumTypeHandler</code> to convert the <code>Enum</code>
16591659
values to their names.
1660-
</p>
1660+
</p>
16611661

1662-
<b>Note <code>EnumTypeHandler</code> is special in the sense that unlike other handlers,
1662+
<b>Note <code>EnumTypeHandler</code> is special in the sense that unlike other handlers,
16631663
it does not handle just one specific class, but any class that extends <code>Enum</code></b>
16641664

1665-
<p>However, we may not want to store names. Our DBA may insist on an
1665+
<p>However, we may not want to store names. Our DBA may insist on an
16661666
integer code instead. That's just as easy: add <code>EnumOrdinalTypeHandler</code>
16671667
to the <code>typeHandlers</code> in your config file, and now each
16681668
<code>RoundingMode</code> will be mapped to an integer using its ordinal value.
1669-
</p>
1670-
<source><![CDATA[<!-- mybatis-config.xml -->
1669+
</p>
1670+
<source><![CDATA[<!-- mybatis-config.xml -->
16711671
<typeHandlers>
16721672
<typeHandler handler="org.apache.ibatis.type.EnumOrdinalTypeHandler"
16731673
javaType="java.math.RoundingMode"/>
@@ -1677,18 +1677,18 @@ public class GenericTypeHandler<E extends MyObject> extends BaseTypeHandler<E> {
16771677
But what if you want to map the same <code>Enum</code> to a
16781678
string in one place and to integer in another?
16791679
</p>
1680-
<p>
1681-
The auto-mapper will automatically use <code>EnumOrdinalTypeHandler</code>,
1682-
so if we want to go back to using plain old ordinary
1683-
<code>EnumTypeHandler</code>, we have to tell it, by explicitly setting
1684-
the type handler to use for those SQL statements.
1685-
</p>
1686-
<p>
1687-
(Mapper files aren't covered until the next section, so if this is your first
1688-
time reading through the documentation, you may want to skip this for now
1689-
and come back to it later.)
1690-
</p>
1691-
<source><![CDATA[<!DOCTYPE mapper
1680+
<p>
1681+
The auto-mapper will automatically use <code>EnumOrdinalTypeHandler</code>,
1682+
so if we want to go back to using plain old ordinary
1683+
<code>EnumTypeHandler</code>, we have to tell it, by explicitly setting
1684+
the type handler to use for those SQL statements.
1685+
</p>
1686+
<p>
1687+
(Mapper files aren't covered until the next section, so if this is your first
1688+
time reading through the documentation, you may want to skip this for now
1689+
and come back to it later.)
1690+
</p>
1691+
<source><![CDATA[<!DOCTYPE mapper
16921692
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
16931693
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
16941694
@@ -2218,7 +2218,7 @@ public class C3P0DataSourceFactory extends UnpooledDataSourceFactory {
22182218
}]]></source>
22192219

22202220
<p>To set it up, add a property for each setter method you want MyBatis to call.
2221-
Follows below a sample configuration which connects to a PostgreSQL database:</p>
2221+
Follows below a sample configuration which connects to a PostgreSQL database:</p>
22222222

22232223
<source><![CDATA[<dataSource type="org.myproject.C3P0DataSourceFactory">
22242224
<property name="driver" value="org.postgresql.Driver"/>

0 commit comments

Comments
 (0)