code: public static String concatEntityCollectionHref(
        String baseUri,
        String qualifiedEntityName,
        String qualifiedIdAttributeName,
        List<String> entitiesIds) {
      String ids;
      ids = entitiesIds.stream().map(Href::encodeIdToRSQL).collect(Collectors.joining(","));
      return String.format(
          "%s/%s?q=%s=in=(%s)",
          baseUri,
          encodePathSegment(qualifiedEntityName),
          encodePathSegment(qualifiedIdAttributeName),
          ids);
    }
docs: Create an encoded href for an entity collection