@@ -811,7 +811,7 @@ public class Author {
811811 <code >ByteTypeHandler</code >
812812 </td >
813813 <td >
814- <code >java.lang.Byte</code >, byte
814+ <code >java.lang.Byte</code >, < code > byte</ code >
815815 </td >
816816 <td >
817817 Any compatible <code >NUMERIC</code > or <code >BYTE</code >
@@ -855,7 +855,7 @@ public class Author {
855855 <code >FloatTypeHandler</code >
856856 </td >
857857 <td >
858- <code >java.lang.Float</code >, float
858+ <code >java.lang.Float</code >, < code > float</ code >
859859 </td >
860860 <td >
861861 Any compatible <code >NUMERIC</code > or <code >FLOAT</code >
@@ -1053,10 +1053,9 @@ public class Author {
10531053 </table >
10541054 <p >
10551055 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:
10601059 </p >
10611060
10621061 <source ><![CDATA[ // ExampleTypeHandler.java
@@ -1117,7 +1116,7 @@ public class ExampleTypeHandler extends BaseTypeHandler<String> {
11171116 <p >Associated JDBC type can be specified by two means:</p >
11181117 <ul >
11191118 <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 >).
11211120 </li >
11221121 <li >Adding a <code >@MappedJdbcTypes</code > annotation to your TypeHandler class specifying
11231122 the list of JDBC types to associate it with. This annotation will be ignored if
@@ -1271,7 +1270,10 @@ public class ExampleObjectFactory extends DefaultObjectFactory {
12711270 public void setProperties(Properties properties) {
12721271 super.setProperties(properties);
12731272 }
1274- }]]> </source >
1273+ public <T> boolean isCollection(Class<T> type) {
1274+ return Collection.class.isAssignableFrom(type);
1275+ }}
1276+ ]]> </source >
12751277
12761278 <source ><![CDATA[ <!-- mybatis-config.xml -->
12771279<objectFactory type="org.mybatis.example.ExampleObjectFactory">
0 commit comments