class RepositoryUserService implements UserService {

    @Override
    public List<UserData> searchStaffMemberDataOfUser(User user, String query, Sort sort) {
        var staff = getHierarchyForUser(user).getStaff().stream()
                .map(HierarchyTreeNode::getUser)
                .collect(Collectors.toList());

        var dataMatchingQuery = hibernateSearchService.searchUserData(staff, query);
        return initializeThumbnailPhotos(dataMatchingQuery);
    }

    public  RepositoryUserService(UserRepository userRepo,
                                 UserDataRepository dataRepo,
                                 LdapAdapter ldapAdapter,
                                 HierarchyTreeNodeRepository hierarchyTreeNodeRepo,
                                 HibernateSearchService hibernateSearchService);

}