list=knResourceDao.findAll(new Specification<KnResource>(){
@Override public Predicate toPredicate(Root<KnResource> root,CriteriaQuery<?> query,CriteriaBuilder cb){
Predicate predicate=cb.conjunction();
List<Expression<Boolean>> expressions=predicate.getExpressions();
expressions.add(cb.equal(root.<KnResource.ResourceType>get(“type”),KnResource.ResourceType.FUNCTION));
if(searchParams!=null&&searchParams.size()!=0){
if(searchParams.containsKey(“LIKE_active”)&&!Strings.isNullOrEmpty(searchParams.get(“LIKE_active”).toString())){
expressions.add(cb.equal(root.<KnRole.ActiveType>get(“active”),KnResource.ActiveType.valueOf(searchParams.get(“LIKE_active”).toString())));
}
if(searchParams.containsKey(“LIKE_name”)&&!Strings.isNullOrEmpty(searchParams.get(“LIKE_name”).toString())){
expressions.add(cb.like(root.<String>get(“name”),”%”+searchParams.get(“LIKE_name”)+”%”));
}
if(searchParams.containsKey(“LIKE_markName”)&&!Strings.isNullOrEmpty(searchParams.get(“LIKE_markName”).toString())){
expressions.add(cb.like(root.<String>get(“markName”),”%”+searchParams.get(“LIKE_markName”)+”%”));
}
if(searchParams.containsKey(“LIKE_version”)&&!Strings.isNullOrEmpty(searchParams.get(“LIKE_version”).toString())){
expressions.add(cb.like(root.<String>get(“version”),”%”+searchParams.get(“LIKE_version”)+”%”));
}
}
if(beginTime!=null){
expressions.add(cb.greaterThanOrEqualTo(root.<Long>get(“createTime”),beginTime));
}
if(endTime!=null){
expressions.add(cb.lessThanOrEqualTo(root.<Long>get(“createTime”),endTime));
}
return predicate;
}
},pageRequest);
代码如上,请问我怎么将以上的模糊查询变成忽略大小写模糊查询?