<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" " http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="t_table"><!--t_table表名-->
<resultMap class="com.study.model.Ttable" id="abatorgenerated_Ttable">
<!--
com.study.model.Ttable表模型
abatorgenerated_Ttable
--><!--
WARNING - This element is automatically generated by Abator for iBATIS, do not modify.
This element was generated on Web Dec 17 11:12:13 CST 2015
--><!--
以下result 为表字段
--><result column="id" property="id" jdbcType="INTEGER"/>
<result column="name" property="name" jdbcType="VARCHAR"/>
<result column="password" property="password" jdbcType="VARCHAR"/>
<result column="sex" property="sex" jdbcType="VARCHAR"/>
<result column="age" property="age" jdbcType="INTEGER"/>
<result column="phone" property="phone" jdbcType="VARCHAR"/>
<result column="address" property="address" jdbcType="VARCHAR"/>
</resultMap>
<!--
动态生成SQL语句
-->
<sql id="abatorgenerated_Example_Where_Clause">
<iterate property="oredCriteria" conjunction="or" prepend="where" removeFirstPrepend="iterate">
<isEqual property="oredCriteria[].valid" compareValue="true">
(
<iterate prepend="and" property="oredCriteria[].criteriaWithoutValue" conjunction="and">
$oredCriteria[].criteriaWithoutValue[]$
</iterate>
<iterate prepend="and" property="oredCriteria[].criteriaWithSingleValue" conjunction="and">
$oredCriteria[].criteriaWithSingleValue[].contdition$
#oredCriteria[].criteriaWithSingleValue.value#
</iterate>
<iterate prepend="and" property="oredCriteria[].criteriaWithListValue" conjunction="and">
$oredCriteria[].criteriaWithListValue[].condition$
<iterate property="oredCriteria[].criteriaWithListValue[].values" open="(" close=")" conjunction=",">
#oredCriteria[].criteriaWithListValue[].values[]#
</iterate>
</iterate>
<iterate prepend="and" property="oredCriteria[].criteriaWithBetweenValue" conjunction="and">
$oredCriteria[].criteriaWithBetweenValue[].condition$
#oredCriteria[].criteriaWithBetweenValue[].value[0]# and
#oredCriteria[].criteriaWithBetweenValue[].value[1]#
</iterate>
)
</isEqual>
</iterate>
</sql>
<!--
查询
id被调用时使用
-->
<select id="abatorgenerated_selectByPK" resultMap="t_table">
select id,name,password,sex,age,phone,address from t_table
where id=#id:INTEGER#
</select>
<!--
查询
<include refid="t_table.abatorgenerated_Example_Where_Clause"/>引用动态sql语句生成where语句
<isNotNull property="orderByClause">不为空排序
order by $orderByClause$
</isNotNull>
-->
<select id="abatorgenerated_selectByExample" resultMap="t_table">
select id,name,phone,address from t_table
<isParameterPresent>
<include refid="t_table.abatorgenerated_Example_Where_Clause"/>
<isNotNull property="orderByClause">
order by $orderByClause$
</isNotNull>
</isParameterPresent>
</select>
<!--
删除
-->
<delete id="abatorgenerated_deleteByPK" resultMap="t_table" paramerClass="com.study.model.Ttable">
delete from t_table where id=#id:INTEGER#
</delete>
<!--
删除
-->
<delete id="abatorgenerated_deleteByExample" resultMap="t_table" parameterClass="com.study.model.Ttable">
delete from t_table
<include refid="t_table.abatorgenerated_Example_Where_Clause"/>
</delete>
<insert id="abatorgenerated_insert" parameterClass="com.study.model.Ttable">
insert into t_table(id,name,password,sex,age,phone,address)
values (#id:INTEGER#,#name:VARCHAR#,#password:VARCHAR#,#sex:VARCHAR#,#age:INTEGER#,#phone:VARCHAR#,#address:VARCHAR#)
</insert>
<!--
更新
-->
<update id="abatorgenerated_updateByPK" parameterClass="com.study.model.Ttable">
update t_table set password=#password:VARCHAR# where id=#id:INTEGER#
</update>
<!--
更新
<dynamic prepend="set">
<isNotNull prepend="," property="name">
name=#name:VARCHAR#
</isNotNull>
<isNotNull prepend="," property="password">
password=#password:VARCHAR#
</isNotNull>
</dynamic>
相当于update 语句中的set语句块部分
isNotNull判空,不为空就赋值
-->
<update id="abatorgenerated_updateByPKSelective" parameterClass="com.study.model.Ttable">
update t_table
<dynamic prepend="set">
<isNotNull prepend="," property="name">
name=#name:VARCHAR#
</isNotNull>
<isNotNull prepend="," property="password">
password=#password:VARCHAR#
</isNotNull>
</dynamic>
where id=#id:INTEGER#
</update>
</sqlMap>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" " http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="t_table"><!--t_table表名-->
<resultMap class="com.study.model.Ttable" id="abatorgenerated_Ttable">
<!--
com.study.model.Ttable表模型
abatorgenerated_Ttable
--><!--
WARNING - This element is automatically generated by Abator for iBATIS, do not modify.
This element was generated on Web Dec 17 11:12:13 CST 2015
--><!--
以下result 为表字段
--><result column="id" property="id" jdbcType="INTEGER"/>
<result column="name" property="name" jdbcType="VARCHAR"/>
<result column="password" property="password" jdbcType="VARCHAR"/>
<result column="sex" property="sex" jdbcType="VARCHAR"/>
<result column="age" property="age" jdbcType="INTEGER"/>
<result column="phone" property="phone" jdbcType="VARCHAR"/>
<result column="address" property="address" jdbcType="VARCHAR"/>
</resultMap>
<!--
动态生成SQL语句
-->
<sql id="abatorgenerated_Example_Where_Clause">
<iterate property="oredCriteria" conjunction="or" prepend="where" removeFirstPrepend="iterate">
<isEqual property="oredCriteria[].valid" compareValue="true">
(
<iterate prepend="and" property="oredCriteria[].criteriaWithoutValue" conjunction="and">
$oredCriteria[].criteriaWithoutValue[]$
</iterate>
<iterate prepend="and" property="oredCriteria[].criteriaWithSingleValue" conjunction="and">
$oredCriteria[].criteriaWithSingleValue[].contdition$
#oredCriteria[].criteriaWithSingleValue.value#
</iterate>
<iterate prepend="and" property="oredCriteria[].criteriaWithListValue" conjunction="and">
$oredCriteria[].criteriaWithListValue[].condition$
<iterate property="oredCriteria[].criteriaWithListValue[].values" open="(" close=")" conjunction=",">
#oredCriteria[].criteriaWithListValue[].values[]#
</iterate>
</iterate>
<iterate prepend="and" property="oredCriteria[].criteriaWithBetweenValue" conjunction="and">
$oredCriteria[].criteriaWithBetweenValue[].condition$
#oredCriteria[].criteriaWithBetweenValue[].value[0]# and
#oredCriteria[].criteriaWithBetweenValue[].value[1]#
</iterate>
)
</isEqual>
</iterate>
</sql>
<!--
查询
id被调用时使用
-->
<select id="abatorgenerated_selectByPK" resultMap="t_table">
select id,name,password,sex,age,phone,address from t_table
where id=#id:INTEGER#
</select>
<!--
查询
<include refid="t_table.abatorgenerated_Example_Where_Clause"/>引用动态sql语句生成where语句
<isNotNull property="orderByClause">不为空排序
order by $orderByClause$
</isNotNull>
-->
<select id="abatorgenerated_selectByExample" resultMap="t_table">
select id,name,phone,address from t_table
<isParameterPresent>
<include refid="t_table.abatorgenerated_Example_Where_Clause"/>
<isNotNull property="orderByClause">
order by $orderByClause$
</isNotNull>
</isParameterPresent>
</select>
<!--
删除
-->
<delete id="abatorgenerated_deleteByPK" resultMap="t_table" paramerClass="com.study.model.Ttable">
delete from t_table where id=#id:INTEGER#
</delete>
<!--
删除
-->
<delete id="abatorgenerated_deleteByExample" resultMap="t_table" parameterClass="com.study.model.Ttable">
delete from t_table
<include refid="t_table.abatorgenerated_Example_Where_Clause"/>
</delete>
<insert id="abatorgenerated_insert" parameterClass="com.study.model.Ttable">
insert into t_table(id,name,password,sex,age,phone,address)
values (#id:INTEGER#,#name:VARCHAR#,#password:VARCHAR#,#sex:VARCHAR#,#age:INTEGER#,#phone:VARCHAR#,#address:VARCHAR#)
</insert>
<!--
更新
-->
<update id="abatorgenerated_updateByPK" parameterClass="com.study.model.Ttable">
update t_table set password=#password:VARCHAR# where id=#id:INTEGER#
</update>
<!--
更新
<dynamic prepend="set">
<isNotNull prepend="," property="name">
name=#name:VARCHAR#
</isNotNull>
<isNotNull prepend="," property="password">
password=#password:VARCHAR#
</isNotNull>
</dynamic>
相当于update 语句中的set语句块部分
isNotNull判空,不为空就赋值
-->
<update id="abatorgenerated_updateByPKSelective" parameterClass="com.study.model.Ttable">
update t_table
<dynamic prepend="set">
<isNotNull prepend="," property="name">
name=#name:VARCHAR#
</isNotNull>
<isNotNull prepend="," property="password">
password=#password:VARCHAR#
</isNotNull>
</dynamic>
where id=#id:INTEGER#
</update>
</sqlMap>