@@ -811,7 +811,7 @@ public class Author {
811
811
<code >ByteTypeHandler</code >
812
812
</td >
813
813
<td >
814
- <code >java.lang.Byte</code >, byte
814
+ <code >java.lang.Byte</code >, < code > byte</ code >
815
815
</td >
816
816
<td >
817
817
Any compatible <code >NUMERIC</code > or <code >BYTE</code >
@@ -855,7 +855,7 @@ public class Author {
855
855
<code >FloatTypeHandler</code >
856
856
</td >
857
857
<td >
858
- <code >java.lang.Float</code >, float
858
+ <code >java.lang.Float</code >, < code > float</ code >
859
859
</td >
860
860
<td >
861
861
Any compatible <code >NUMERIC</code > or <code >FLOAT</code >
@@ -1053,10 +1053,9 @@ public class Author {
1053
1053
</table >
1054
1054
<p >
1055
1055
You can override the type handlers or create your own to deal with
1056
- unsupported or non-standard types. To do so, simply extend
1057
- the
1058
- <code >org.apache.ibatis.type.BaseTypeHandler</code > class and optionally map your new
1059
- TypeHandler class to a JDBC type. For example:
1056
+ unsupported or non-standard types. To do so, implement the interface <code >org.apache.ibatis.type.TypeHandler</code >
1057
+ or extend the convenience class <code >org.apache.ibatis.type.BaseTypeHandler</code >
1058
+ and optionally map it to a JDBC type. For example:
1060
1059
</p >
1061
1060
1062
1061
<source ><![CDATA[ // ExampleTypeHandler.java
@@ -1117,7 +1116,7 @@ public class ExampleTypeHandler extends BaseTypeHandler<String> {
1117
1116
<p >Associated JDBC type can be specified by two means:</p >
1118
1117
<ul >
1119
1118
<li >
1120
- Adding a <code >jdbcType</code > attribute to the typeHandler element (for example: <code >jdbcType=VARCHAR</code >).
1119
+ Adding a <code >jdbcType</code > attribute to the typeHandler element (for example: <code >jdbcType=" VARCHAR" </code >).
1121
1120
</li >
1122
1121
<li >Adding a <code >@MappedJdbcTypes</code > annotation to your TypeHandler class specifying
1123
1122
the list of JDBC types to associate it with. This annotation will be ignored if
@@ -1271,7 +1270,10 @@ public class ExampleObjectFactory extends DefaultObjectFactory {
1271
1270
public void setProperties(Properties properties) {
1272
1271
super.setProperties(properties);
1273
1272
}
1274
- }]]> </source >
1273
+ public <T> boolean isCollection(Class<T> type) {
1274
+ return Collection.class.isAssignableFrom(type);
1275
+ }}
1276
+ ]]> </source >
1275
1277
1276
1278
<source ><![CDATA[ <!-- mybatis-config.xml -->
1277
1279
<objectFactory type="org.mybatis.example.ExampleObjectFactory">
0 commit comments