分类 java 下的文章

下表把 jpa 做的各种查询规范都列出来了。 如果要做其他相关查询,按照表格中的规范设计接口方法即可。


关键词 举例 生成的JPQL 语句片段
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)</age> … where x.age in ?1
NotIn findByAgeNotIn(Collection<age> 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)

持续不断更新,支持交互、无人值守安装
源码编译安装,大多数源码是最新stable版,并从官方网址下载
提供多个数据库版本(MySQL-8.0, MySQL-5.7, MySQL-5.6, MySQL-5.5, MariaDB-10.4,MariaDB-10.3,MariaDB-10.2,MariaDB-5.5,Percona-8.0, Percona-5.7, Percona-5.6, Percona-5.5,AliSQL-5.6,PostgreSQL, MongoDB)
提供多个PHP版本(PHP-7.4,PHP-7.3,PHP-7.2,PHP-7.1,PHP-7.0,PHP-5.6, PHP-5.5,PHP-5.4,PHP-5.3)
提供Nginx、Tengine、OpenResty和nginx waf功能
提供多个Apache版本(Apache-2.4,Apache-2.2)
提供多个Tomcat版本(Tomcat-9,Tomcat-8,Tomcat-7,Tomcat-6)
提供多个JDK版本(JDK-11.0,JDK-1.8,JDK-1.7,JDK-1.6)
根据自己需求安装PHP缓存加速器,提供ZendOPcache、xcache、apcu、eAccelerator。及php加解密工具ionCube、ZendGuardLoader
根据自己需求安装Pureftpd、phpMyAdmin
根据自己需求安装Memcached、Redis
jemalloc优化MySQL、Nginx
提供添加虚拟主机脚本
提供Nginx/Tengine/OpenResty/Apache、PHP、Redis、Memcached、phpMyAdmin升级脚本
提供本地备、远程(rsync)、阿里云OSS、腾讯云COS、又拍云、七牛云、亚马逊S3和Dropbox备份脚本
提供CentOS 6、7下HHVM安装
网站地址:https://oneinstack.com/