private List<User> getMatchingUsersOrGroups(final Condition condition,
                                                final Collection<OrderField<?>> orderFields,
                                                final int offset,
                                                final int limit) {
        LOGGER.debug("getMatchingUsersOrGroups - condition: {}", condition);
        final List<User> list;
        list = JooqUtil.contextResult(securityDbConnProvider, context -> context
                        .select()
                        .from(STROOM_USER)
                        .where(condition)
                        .orderBy(orderFields)
                        .offset(offset)
                        .limit(limit)
                        .fetch())
                .stream()
                .map(RECORD_TO_USER_MAPPER)
                .toList();
        return list;
    }
Get user or group by their UUID.
stroom-security/stroom-security-impl-db/src/main/java/stroom/security/impl/db/UserDaoImpl.java