林徽因传
Expression查询语法
A:Expression查询语法
1:Expression.eq: 对应sql(fidld=value):Expression.eq("name","zhengjigang")
2:Expression.allEq:参数为⼀个Map对象。相当于多个Expression.eq关系的叠加
:对应sql(field>value)
:对应sql(field>=value)
小鞋匠5:Expression.lt:对应sql(field<value)
6:Expression.le:对应sql(field<=value)
7:Expression.between:对应sql中的between表达式:Expression.between("age",new Integer(13),new Integer(15))
8:Expression.like:对应sql(field like value)
9:Expression.in:对应sql(field in value)
短阵房性心动过速
校园灵异事件10:Expression.eqProperty:对应pojo属性的sql(field=field):Expression.eqProperty("upId","Tgroup.id")
Property:对应的sql(field>field)
Property:对应的sql(field>=field)
劳动实践报告13:Expression.ltProperty:对应的sql(field<field)
14:Expression.leProperty:对应的sql(field<=field)
用卡纸怎么做灯笼15:Expression.and:and关系组合:Expression.and(Expression.eq("name","zhengjigang"),Expression.eq("job","软件⼯程师"))
:and关系组合:(Expression.eq("name","zhengjigang"),Expression.eq("job","软件⼯程师"))
我拒绝英语17:Expression.sql:提供原⽣sql语法的⽀持:Expression.sql("lower({demo}.name) like lower(?)","zhengjigang%",Hibernate.String)
虫字的笔顺B:Criteria的⾼级查询
1: 限定返回的记录条数:Criteria ateCriteria(Tur.class); criteria.tFirstResult(100);//开始的记录的索引 criteria.tMaxResults(20)//取得最⼤民录数
2:对记录进⾏排序:Criteria ateCriteria(Tur.class); criteria.add(Expression.eq("name","zhengjigang")); criteria.addOrder(Order.asc("name")); //对name字段进⾏升序排序