转的:Hibernate 的 Criteria用法
来源:互联网 发布:互联网数据运营 编辑:程序博客网 时间:2024/05/18 00:23
方法
说明
Restrictions.eq
=
Restrictions.allEq
利用Map来进行多个等于的限制
Restrictions.gt
>
Restrictions.ge
>=
Restrictions.lt
<
Restrictions.le
<=
Restrictions.between
BETWEEN
Restrictions.like
LIKE
Restrictions.in
in
Restrictions.and
and
Restrictions.or
or
Restrictions.sqlRestriction
用SQL限定查询
QBC常用限定方法
Restrictions.eq --> equal,等于.
Restrictions.allEq --> 参数为Map对象,使用key/value进行多个等于的比对,相当于多个Restrictions.eq的效果
Restrictions.gt --> great-than > 大于
Restrictions.ge --> great-equal >= 大于等于
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
Restrictions.isNotNull --> 与isNull相反
Restrictions.sqlRestriction --> SQL限定的查询
Order.asc --> 根据传入的字段进行升序排序
Order.desc --> 根据传入的字段进行降序排序
MatchMode.EXACT --> 字符串精确匹配.相当于"like 'value'"
MatchMode.ANYWHERE --> 字符串在中间匹配.相当于"like '%value%'"
MatchMode.START --> 字符串在最前面的位置.相当于"like 'value%'"
MatchMode.END --> 字符串在最后面的位置.相当于"like '%value'"
- 转的:Hibernate 的 Criteria用法
- 转的:Hibernate 的 Criteria用法
- Hibernate中Criteria的完整用法(转)
- Hibernate中Criteria的完整用法(转)
- Hibernate中Criteria的完整用法 (转)
- Hibernate的Criteria的用法
- Hibernate 的 Criteria的用法
- Hibernate 的 Criteria的用法
- Hibernate的Criteria的用法
- Hibernate 的 Criteria的用法
- Hibernate中Criteria的用法
- hibernate的Criteria Query 用法
- Hibernate中Criteria的用法
- 【hibernate】04-Criteria的用法
- hibernate-criteria的or()用法
- Hibernate的Criteria用法总结
- Hibernate Criteria的完整用法
- Hibernate中Criteria的用法
- 输入T-CODE执行DEBUG操作
- Context [] startup failed due to previous errors
- Android 签名详解
- IllegalArgumentException occurred while calling setter of
- 在SSH中使用Hessian
- 转的:Hibernate 的 Criteria用法
- c#控制输入法
- [转]Eclipse下tomcat输出路径配置
- hibernate 批量删除
- C语言基础知识
- 【web前端】折腾:瀑布流布局(基于多栏列表流体布局实现)
- 正则表达式
- SSL java
- TOAD使用笔记