code: public List<UserPermissionDto> selectUserPermissionsByQuery(DbSession dbSession, PermissionQuery query, Collection<Integer> userIds) {
      if (userIds.isEmpty()) {
        return emptyList();
      }
      checkArgument(userIds.size() <= DatabaseUtils.PARTITION_SIZE_FOR_ORACLE, "Maximum 1'000 users are accepted");
      return mapper(dbSession).selectUserPermissionsByQueryAndUserIds(query, userIds);
    }
docs: List of user permissions ordered by alphabetical order of user names.
  Pagination is NOT applied.
  No sort is done.
  
  @param query non-null query including optional filters.
  @param userIds Filter on user ids, including disabled users. Must not be empty and maximum size is {@link DatabaseUtils#PARTITION_SIZE_FOR_ORACLE}.