hibernate里的DetachedCriteria的幾種條件查詢方法
detachedCriteria.add(Restrictions.eq("user.userId", userId));
Restrictions.eq()是等于,Restrictions.allMap()使用Map,使用key和value進行多個等于的對比
Restrictions.gt()大于,Restrictions.ge()大于等于,Restrictions.lt()小于,
Restrictions.le()小于等于,Restrictions.between()對應sql中的between字句,
Restrictions.like()對應sql的like字句,
Restrictions.in()對應sql的in字句
Restrictions.and()
Restrictions.or()
Restrictions.sqlRestnction(),是對sql限定查詢