docs: protected <OTHER, MISC, X extends Comparable<? super X>> Specification<ENTITY> buildReferringEntitySpecification(final RangeFilter<X> filter,
                                                                                                                       Function<Root<ENTITY>, SetJoin<MISC, OTHER>> functionToEntity,
                                                                                                                       Function<SetJoin<MISC, OTHER>, Expression<X>> entityToColumn) {
  
          Function<Root<ENTITY>, Expression<X>> fused = functionToEntity.andThen(entityToColumn);
          if (filter.getEquals() != null) {
              return equalsSpecification(fused, filter.getEquals());
          } else if (filter.getIn() != null) {
              return valueIn(fused, filter.getIn());
          }
          Specification<ENTITY> result = Specification.where(null);
          if (filter.getSpecified() != null) {
              // Interestingly, 'functionToEntity' doesn't work, we need the longer lambda formula 
              result = result.and(byFieldSpecified(root -> functionToEntity.apply(root), filter.getSpecified()));
          }
          if (filter.getGreaterThan() != null) {
              result = result.and(greaterThan(fused, filter.getGreaterThan()));
          }
          if (filter.getGreaterOrEqualThan() != null) {
              result = result.and(greaterThanOrEqualTo(fused, filter.getGreaterOrEqualThan()));
          }
          if (filter.getLessThan() != null) {
              result = result.and(lessThan(fused, filter.getLessThan()));
          }
          if (filter.getLessOrEqualThan() != null) {
              result = result.and(lessThanOrEqualTo(fused, filter.getLessOrEqualThan()));
          }
          return result;
      }