spring data jpa 内部接口参照表
2015-12-11 16:33
417 查看
Keyword | Sample | JPQL snippet |
---|---|---|
And | findByLastnameAndFirstname | … where x.lastname = ?1 and x.firstname = ?2 |
Or | findByLastnameOrFirstname | … where x.lastname = ?1 or x.firstname = ?2 |
Is,Equals | findByFirstname, findByFirstnameIs, findByFirstnameEquals | … where x.firstname = 1? |
Between | findByStartDateBetween | … where x.startDate between 1? and ?2 |
LessThan | findByAgeLessThan | … where x.age < ?1 |
LessThanEqual | findByAgeLessThanEqual | … where x.age ⇐ ?1 |
GreaterThan | findByAgeGreaterThan | … where x.age > ?1 |
GreaterThanEqual | findByAgeGreaterThanEqual | … where x.age >= ?1 |
After | findByStartDateAfter | … where x.startDate > ?1 |
Before | findByStartDateBefore | … where x.startDate < ?1 |
IsNull | findByAgeIsNull | … where x.age is null |
IsNotNull,NotNull | findByAge(Is)NotNull | … where x.age not null |
Like | findByFirstnameLike | … where x.firstname like ?1 |
NotLike | findByFirstnameNotLike | … where x.firstname not like ?1 |
StartingWith | findByFirstnameStartingWith | … where x.firstname like ?1(parameter bound with appended %) |
EndingWith | findByFirstnameEndingWith | … where x.firstname like ?1(parameter bound with prepended %) |
Containing | findByFirstnameContaining | … where x.firstname like ?1(parameter bound wrapped in %) |
OrderBy | findByAgeOrderByLastnameDesc | … where x.age = ?1 order by x.lastname desc |
Not | findByLastnameNot | … where x.lastname <> ?1 |
In | findByAgeIn(Collection<Age> ages) | … where x.age in ?1 |
NotIn | findByAgeNotIn(Collection<Age> age) | … where x.age not in ?1 |
True | findByActiveTrue() | … where x.active = true |
False | findByActiveFalse() | … where x.active = false |
IgnoreCase | findByFirstnameIgnoreCase | … where UPPER(x.firstame) = UPPER(?1) |
相关文章推荐
- java关于static粗陋见解
- spring配置hibernate的sessionFactory的几种方法
- eclipse提交代码值git上面
- java,输入一个类或几个类,找到所有import的相关的类,相关的类又import
- eclipse插件开发中全局对象的获取
- 10 Java基础 多线程2
- Java的几种对象(PO,VO,DAO,BO,POJO)解释
- MyEclipse配置JDK的详细方法
- 老李分享:java线程生命周期 2
- 老李分享:java线程生命周期 1
- java集合List的遍历方式
- struts s 标签通用分页
- java 判断字符串是否为空的四种方法
- Ehcache 整合Spring 使用页面、对象缓存
- java实现附件预览(openoffice+swftools+flexpaper)
- Java基础Scanner和String类
- 接口回调机制
- 深入理解java异常处理机制
- My安装Eclipse三种方法插件
- Java 之 文件读写及性能比较总结