code: protected <X> Specification<ENTITY> buildSpecification(Filter<X> filter, Function<Root<ENTITY>, Expression<X>> metaclassFunction) {
          if (filter.getEquals() != null) {
              return equalsSpecification(metaclassFunction, filter.getEquals());
          } else if (filter.getIn() != null) {
              return valueIn(metaclassFunction, filter.getIn());
          } else if (filter.getSpecified() != null) {
              return byFieldSpecified(metaclassFunction, filter.getSpecified());
          }
          return null;
      }
docs: Helper function to return a specification for filtering on a single field, where equality, and null/non-null
  conditions are supported.
  
  @param filter            the individual attribute filter coming from the frontend.
  @param metaclassFunction the function, which navigates from the current entity to a column, for which the filter applies.
  @param <X>               The type of the attribute which is filtered.
  @return a Specification