code: public <T> List<Predicate> byExample(ManagedType<T> mt, Path<T> mtPath, T mtValue, SearchParameters sp, CriteriaBuilder builder) {
          List<Predicate> predicates = newArrayList();
          for (SingularAttribute<? super T, ?> attr : mt.getSingularAttributes()) {
              if (!isPrimaryKey(mt, attr)) {
                  continue;
              }
  
              Object attrValue = jpaUtil.getValue(mtValue, attr);
              if (attrValue != null) {
                  predicates.add(builder.equal(mtPath.get(jpaUtil.attribute(mt, attr)), attrValue));
              }
          }
          return predicates;
      }
docs: /*
  Add a predicate for each simple property whose value is not null.