天天看點

Restrictions HQL QBC

HQL運算符 QBC運算符 含義
= Restrictions.eq() 等于equal
<>  Restrictions.ne() 不等于not equal
Restrictions.gt() 大于greater than
>= Restrictions.ge() 大于等于greater than or equal
Restrictions.lt() 小于less than
<= Restrictions.le() 小于等于less than or equal
is null Restrictions.isnull() 等于空值
is not null Restrictions.isNotNull() 非空值
like Restrictions.like() 字元串模式比對
and Restrictions.and() 邏輯與
and Restrictions.conjunction() 邏輯與
or Restrictions.or() 邏輯或
or Restrictions.disjunction() 邏輯或
not Restrictions.not() 邏輯非
in(清單) Restrictions.in() 等于清單中的某一個值
not in(清單) Restrictions.not(Restrictions.in()) 不等于清單中任意一個值
between x and y Restrictions.between() 閉區間xy中的任意值
not between x and y Restrictions.not(Restrictions..between()) 小于值X或者大于值y