Restrictions.eq():equal,=
Restrictions.allEq(): 参数为Map对象,使用key/value进行多个等于的对比,相当于多个 Restrictions.eq()的效果
Restrictions.gt():greater-than,<
Restrictions.lt():less-than,<
Restrictions.le:less-equal,<=
Restrictions.between():对应SQL的between子句。
Restrictions.like():对应SQL的like子句。
Restrictions.in():对应SQL的in子句。
Restrictions.and():and 关系。
Restrictions.or():or 关系。
Restrictions.isNull():判断属性是否为空,为空返回true,否则返回false。
Restrictions.isNoyNull():与上面的相反。
Order.asc():根据传入的字段进行升序排序。
Order.desc():与上相反
MatchMode.EXACT:字符串中精确匹配,相当于like 'value'
MatchMode.ANYWHERE:字符串在中间位置,相当于like'%value%'
MatchMode.START:字符串在最前面,相当于like'value%'
MatchMode.END:字符串在最后,相当于like'%value'
Restrictions.allEq(): 参数为Map对象,使用key/value进行多个等于的对比,相当于多个 Restrictions.eq()的效果
Restrictions.gt():greater-than,<
Restrictions.lt():less-than,<
Restrictions.le:less-equal,<=
Restrictions.between():对应SQL的between子句。
Restrictions.like():对应SQL的like子句。
Restrictions.in():对应SQL的in子句。
Restrictions.and():and 关系。
Restrictions.or():or 关系。
Restrictions.isNull():判断属性是否为空,为空返回true,否则返回false。
Restrictions.isNoyNull():与上面的相反。
Order.asc():根据传入的字段进行升序排序。
Order.desc():与上相反
MatchMode.EXACT:字符串中精确匹配,相当于like 'value'
MatchMode.ANYWHERE:字符串在中间位置,相当于like'%value%'
MatchMode.START:字符串在最前面,相当于like'value%'
MatchMode.END:字符串在最后,相当于like'%value'