docs: @SuppressWarnings({ "unchecked", "rawtypes" })
      protected <T> void applySearchCriteriaToQuery(SearchCriteriaBean criteria, CriteriaBuilder builder,
              CriteriaQuery<?> query, Root<T> from, boolean countOnly) {
  
          List<SearchCriteriaFilterBean> filters = criteria.getFilters();
          if (filters != null && !filters.isEmpty()) {
              List<Predicate> predicates = new ArrayList<>();
              for (SearchCriteriaFilterBean filter : filters) {
                  if (filter.getOperator() == SearchCriteriaFilterOperator.eq) {
                      Path<Object> path = from.get(filter.getName());
                      Class<?> pathc = path.getJavaType();
                      if (pathc.isAssignableFrom(String.class)) {
                          predicates.add(builder.equal(path, filter.getValue()));
                      } else if (pathc.isEnum()) {
                          predicates.add(builder.equal(path, Enum.valueOf((Class)pathc, filter.getValue())));
                      }
                  } else if (filter.getOperator() == SearchCriteriaFilterOperator.bool_eq) {
                      predicates.add(builder.equal(from.<Boolean>get(filter.getName()), Boolean.valueOf(filter.getValue())));
                  } else if (filter.getOperator() == SearchCriteriaFilterOperator.gt) {
                      predicates.add(builder.greaterThan(from.<Long>get(filter.getName()), new Long(filter.getValue())));
                  } else if (filter.getOperator() == SearchCriteriaFilterOperator.gte) {
                      predicates.add(builder.greaterThanOrEqualTo(from.<Long>get(filter.getName()), new Long(filter.getValue())));
                  } else if (filter.getOperator() == SearchCriteriaFilterOperator.lt) {
                      predicates.add(builder.lessThan(from.<Long>get(filter.getName()), new Long(filter.getValue())));
                  } else if (filter.getOperator() == SearchCriteriaFilterOperator.lte) {
                      predicates.add(builder.lessThanOrEqualTo(from.<Long>get(filter.getName()), new Long(filter.getValue())));
                  } else if (filter.getOperator() == SearchCriteriaFilterOperator.neq) {
                      predicates.add(builder.notEqual(from.get(filter.getName()), filter.getValue()));
                  } else if (filter.getOperator() == SearchCriteriaFilterOperator.like) {
                      predicates.add(builder.like(builder.upper(from.<String>get(filter.getName())), filter.getValue().toUpperCase().replace('*', '%')));
                  }
              }
              query.where(predicates.toArray(new Predicate[predicates.size()]));
          }
          OrderByBean orderBy = criteria.getOrderBy();
          if (orderBy != null && !countOnly) {
              if (orderBy.isAscending()) {
                  query.orderBy(builder.asc(from.get(orderBy.getName())));
              } else {
                  query.orderBy(builder.desc(from.get(orderBy.getName())));
              }
          }
      }