Used by <resultMap /> :
/* MyBatis Configuration XML File */
<typeHandlers>
<typeHandler jdbcType="java.sql.Timestamp" javaType="org.joda.time.LocalDateTime" handler="...LocalDateTimeTypeHandler"/>
</typeHandlers>
/* Mapper Interface */
import org.joda.time.LocalDateTime;
public interface NotifMailDao {
LocalDateTime getLastNotifTime();
}
/* MyBatis Mapper XML File */
<?xml version="1.0" encoding="UTF-8"?>
<mapper namespace="lu.bgl.notif.mail.dao.NotifMailDao">
<resultMap id="notifMailResultMap" type="org.joda.time.LocalDateTime">
<result column="LAST_TIME" property="lastTime" jdbcType="java.sql.Timestamp" javaType="org.joda.time.LocalDateTime" />
</resultMap>
<select id="getLastNotifTime" resultMap="notifMailResultMap">
SELECT current_timestamp AS LAST_TIME
FROM DUAL
</select>
</mapper>