docs: @SuppressWarnings("unchecked")
      private static <Y extends Comparable<? super Y>> Predicate createRangePredicate( CriteriaBuilder builder, Expression field, Object start, Object end, Class<Y> rangeType ) {
          if( start != null && end != null ) {
              // TODO :asserts!
              return builder.between(field, (Y) start, (Y) end);
          } else if ( start != null ) {
              return builder.greaterThanOrEqualTo(field, (Y) start);
          } else {
              return builder.lessThanOrEqualTo(field, (Y) end);
          }
      }