<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="test.dao.CustomerMapper" >
<resultMap id="BaseResultMap" type="test.model.Customer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
<id column="CONTACT_ID" property="CONTACT_ID" jdbcType="INTEGER" />
<result column="CONTACT_EMAIL" property="CONTACT_EMAIL" jdbcType="VARCHAR" />
<result column="CONTACT_NAME" property="CONTACT_NAME" jdbcType="VARCHAR" />
<result column="CONTACT_PHONE" property="CONTACT_PHONE" jdbcType="VARCHAR" />
</resultMap>
<sql id="Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
CONTACT_ID, CONTACT_EMAIL, CONTACT_NAME, CONTACT_PHONE
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="test.model.CustomerExample" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from contact
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
select
<include refid="Base_Column_List" />
from contact
where CONTACT_ID = #{CONTACT_ID,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
delete from contact
where CONTACT_ID = #{CONTACT_ID,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="test.model.CustomerExample" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
delete from contact
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="test.model.Customer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
insert into contact (CONTACT_ID, CONTACT_EMAIL, CONTACT_NAME,
CONTACT_PHONE)
values (#{CONTACT_ID,jdbcType=INTEGER}, #{CONTACT_EMAIL,jdbcType=VARCHAR}, #{CONTACT_NAME,jdbcType=VARCHAR},
#{CONTACT_PHONE,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="test.model.Customer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
insert into contact
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="CONTACT_ID != null" >
CONTACT_ID,
</if>
<if test="CONTACT_EMAIL != null" >
CONTACT_EMAIL,
</if>
<if test="CONTACT_NAME != null" >
CONTACT_NAME,
</if>
<if test="CONTACT_PHONE != null" >
CONTACT_PHONE,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="CONTACT_ID != null" >
#{CONTACT_ID,jdbcType=INTEGER},
</if>
<if test="CONTACT_EMAIL != null" >
#{CONTACT_EMAIL,jdbcType=VARCHAR},
</if>
<if test="CONTACT_NAME != null" >
#{CONTACT_NAME,jdbcType=VARCHAR},
</if>
<if test="CONTACT_PHONE != null" >
#{CONTACT_PHONE,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="test.model.CustomerExample" resultType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
select count(*) from contact
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
update contact
<set >
<if test="record.CONTACT_ID != null" >
CONTACT_ID = #{record.CONTACT_ID,jdbcType=INTEGER},
</if>
<if test="record.CONTACT_EMAIL != null" >
CONTACT_EMAIL = #{record.CONTACT_EMAIL,jdbcType=VARCHAR},
</if>
<if test="record.CONTACT_NAME != null" >
CONTACT_NAME = #{record.CONTACT_NAME,jdbcType=VARCHAR},
</if>
<if test="record.CONTACT_PHONE != null" >
CONTACT_PHONE = #{record.CONTACT_PHONE,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
update contact
set CONTACT_ID = #{record.CONTACT_ID,jdbcType=INTEGER},
CONTACT_EMAIL = #{record.CONTACT_EMAIL,jdbcType=VARCHAR},
CONTACT_NAME = #{record.CONTACT_NAME,jdbcType=VARCHAR},
CONTACT_PHONE = #{record.CONTACT_PHONE,jdbcType=VARCHAR}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="test.model.Customer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
update contact
<set >
<if test="CONTACT_EMAIL != null" >
CONTACT_EMAIL = #{CONTACT_EMAIL,jdbcType=VARCHAR},
</if>
<if test="CONTACT_NAME != null" >
CONTACT_NAME = #{CONTACT_NAME,jdbcType=VARCHAR},
</if>
<if test="CONTACT_PHONE != null" >
CONTACT_PHONE = #{CONTACT_PHONE,jdbcType=VARCHAR},
</if>
</set>
where CONTACT_ID = #{CONTACT_ID,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="test.model.Customer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Jun 17 09:23:52 CEST 2014.
-->
update contact
set CONTACT_EMAIL = #{CONTACT_EMAIL,jdbcType=VARCHAR},
CONTACT_NAME = #{CONTACT_NAME,jdbcType=VARCHAR},
CONTACT_PHONE = #{CONTACT_PHONE,jdbcType=VARCHAR}
where CONTACT_ID = #{CONTACT_ID,jdbcType=INTEGER}
</update>
</mapper>
log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.LogFactory). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
Error updating database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for Customer.updateByPrimaryKeySelective
Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for Customer.updateByPrimaryKeySelective
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:154)
at test.dao.CustomerDAO.updateByPrimaryKeySelective(CustomerDAO.java:91)
at test.trial.main.main(main.java:27)
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for Customer.updateByPrimaryKeySelective at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:797) at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:631) at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:624) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:151) ... 2 more
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.