Hibernate Criteria 常量与方法

MatchMode 包含的常量

MatchMode.ANYWHERE 模糊匹配 
MatchMode.EXACT    精确匹配
MatchMode.START    以某个字符为开头进行匹配
MatchMode.END      以某个字符为结尾进行匹配


Restrictions

Restrictions.eq             等于
Restrictions.allEq          使用Map,使用key/value进行多个等于的比较
Restrictions.gt             大于>
Restrictions.ge             大于等于>=
Restrictions.lt             小于<
Restrictions.le             小于等于<=
Restrictions.between        对应SQL的BETWEEN子句
Restrictions.like           对应SQL的LIKE子句
Restrictions.in             对应SQL的in子句
Restrictions.add            and关系
Restrictions.or             or关系
Restrictions.sqlRestriction SQL限定查询


猜你喜欢

转载自lzj0470.iteye.com/blog/1919954