protected Specification<ENTITY> buildStringSpecification(StringFilter filter, SingularAttribute<? super ENTITY,
        String> field) {
        return buildSpecification(filter, root -> root.get(field));
    }
protected Specification < ENTITY > buildStringSpecification ( StringFilter filter , SingularAttribute < ? super ENTITY , String > field ) { return buildSpecification ( filter , root -> root . get ( field ) ) ; }
Helper function to return a specification for filtering on a {@link String} field, where equality, containment,
and null/non-null conditions are supported.

@param filter the individual attribute filter coming from the frontend.
@param field  the JPA static metamodel representing the field.
@return a Specification