hibernate查询条件表达式Restrictions
来源:互联网 发布:河北省人工智能学会 编辑:程序博客网 时间:2024/05/22 02:22
主要是从官网上拔下来的例子:
官网链接:http://docs.jboss.org/hibernate/orm/3.5/javadocs/org/hibernate/criterion/Restrictions.html
static CriterionallEq(Map propertyNameValues) Apply an "equals" constraint to each property in the key set of a Mapstatic LogicalExpressionand(Criterion lhs, Criterion rhs) Return the conjuction of two expressionsstatic Criterionbetween(String propertyName, Object lo, Object hi) Apply a "between" constraint to the named propertystatic Conjunctionconjunction() Group expressions together in a single conjunction (A and B and C...)static Disjunctiondisjunction() Group expressions together in a single disjunction (A or B or C...)static SimpleExpressioneq(String propertyName, Object value) Apply an "equal" constraint to the named propertystatic PropertyExpressioneqProperty(String propertyName, String otherPropertyName) Apply an "equal" constraint to two propertiesstatic SimpleExpressionge(String propertyName, Object value) Apply a "greater than or equal" constraint to the named propertystatic PropertyExpressiongeProperty(String propertyName, String otherPropertyName) Apply a "greater than or equal" constraint to two propertiesstatic SimpleExpressiongt(String propertyName, Object value) Apply a "greater than" constraint to the named propertystatic PropertyExpressiongtProperty(String propertyName, String otherPropertyName) Apply a "greater than" constraint to two propertiesstatic CriterionidEq(Object value) Apply an "equal" constraint to the identifier propertystatic Criterionilike(String propertyName, Object value) A case-insensitive "like", similar to Postgres ilike operatorstatic Criterionilike(String propertyName, String value, MatchMode matchMode) A case-insensitive "like", similar to Postgres ilike operatorstatic Criterionin(String propertyName, Collection values) Apply an "in" constraint to the named propertystatic Criterionin(String propertyName, Object[] values) Apply an "in" constraint to the named propertystatic CriterionisEmpty(String propertyName) Constrain a collection valued property to be emptystatic CriterionisNotEmpty(String propertyName) Constrain a collection valued property to be non-emptystatic CriterionisNotNull(String propertyName) Apply an "is not null" constraint to the named propertystatic CriterionisNull(String propertyName) Apply an "is null" constraint to the named propertystatic SimpleExpressionle(String propertyName, Object value) Apply a "less than or equal" constraint to the named propertystatic PropertyExpressionleProperty(String propertyName, String otherPropertyName) Apply a "less than or equal" constraint to two propertiesstatic SimpleExpressionlike(String propertyName, Object value) Apply a "like" constraint to the named propertystatic SimpleExpressionlike(String propertyName, String value, MatchMode matchMode) Apply a "like" constraint to the named propertystatic SimpleExpressionlt(String propertyName, Object value) Apply a "less than" constraint to the named propertystatic PropertyExpressionltProperty(String propertyName, String otherPropertyName) Apply a "less than" constraint to two propertiesstatic NaturalIdentifiernaturalId() static SimpleExpressionne(String propertyName, Object value) Apply a "not equal" constraint to the named propertystatic PropertyExpressionneProperty(String propertyName, String otherPropertyName) Apply a "not equal" constraint to two propertiesstatic Criterionnot(Criterion expression) Return the negation of an expressionstatic LogicalExpressionor(Criterion lhs, Criterion rhs) Return the disjuction of two expressionsstatic CriterionsizeEq(String propertyName, int size) Constrain a collection valued property by sizestatic CriterionsizeGe(String propertyName, int size) Constrain a collection valued property by sizestatic CriterionsizeGt(String propertyName, int size) Constrain a collection valued property by sizestatic CriterionsizeLe(String propertyName, int size) Constrain a collection valued property by sizestatic CriterionsizeLt(String propertyName, int size) Constrain a collection valued property by sizestatic CriterionsizeNe(String propertyName, int size) Constrain a collection valued property by sizestatic CriterionsqlRestriction(String sql) Apply a constraint expressed in SQL.static CriterionsqlRestriction(String sql, Object[] values, Type[] types) Apply a constraint expressed in SQL, with the given JDBC parameters.static CriterionsqlRestriction(String sql, Object value, Type type) Apply a constraint expressed in SQL, with the given JDBC parameter.
0 0
- hibernate查询条件表达式Restrictions
- hibernate条件查询Restrictions比较条件含义
- hibernate 多条件与查询:Restrictions
- Hibernate 中 Criteria 查询条件 Restrictions 限定条件参数详解
- hibernate hibernate 多条件与查询:Restrictions.or
- hibernate hibernate 多条件与查询:Restrictions.or
- hibernate Restrictions 用法 查询
- hibernate Restrictions 用法 查询
- Hibernate Restrictions常用限定条件
- Hibernate Criteria条件Restrictions.or查询 循环多个or条件
- Hibernate Criteria条件Restrictions.or查询 循环多个or条件
- hibernate高级查询Restrictions.like()
- hibernate 通过Restrictions设置中文查询条件,不执行无结果集的问题
- Restrictions.sqlRestriction以时间作为条件查询
- hibernate模糊查询-Restrictions.i…
- Hibernate Restrictions
- Restrictions表达式
- Hibernate Criteria的 Criterion,Projection,Restrictions等条件设置
- hdu1022
- 光流法 学习--optical flow
- 原java上传文件 以图片为例 纯Servlet实现
- spring源码之—Assert.notNull
- springMVC的工作原理
- hibernate查询条件表达式Restrictions
- ganglia收集hbase的metrics
- smartform中系统变量总页数sfsy-formpages当前页sfsy-page变成*解决方法
- 常用SQL语句
- 顺序串的实现
- Windows下 如何配置TomCat
- POJ 2186 Popular Cows 强连通分量 Kosaraju算法
- 【C++ 学习笔记小程序03】 整型及其相关知识
- 使用 Struts 2 开发 RESTful 服务