ibatIS中的isNotNull、isEqual、isEmpty

isNull判断property字段是否是null,用isEmpty更方便,包含了null和空字符串

 

例子一:
isEqual相当于equals,数字用得多些,一般都是判断状态值
<isEqual property="state" compareValue="0">
< /isEqual>

<isEqual property="state" compareProperty="nextState">
< /isEqual>

 

例子一:

传入的map或者类的属性name等于"1"吗,是就附加and和vvvv = '哈哈'
<isEqual property="name" compareValue="1" prepend="and">
vvvv = '哈哈'
< /isEqual>

传入的map或者类的属性name是null吗,是就附加and和vvvv = null
< isNull property="name" prepend="and">
vvvv = null
< /isNull>

posted @ 2015-06-30 08:39  歪歪咯  阅读(1094)  评论(0编辑  收藏  举报