protected function getDomainRecordsByRootPageIds(array $rootPageIds = [])
    {
        $queryBuilder = $this->getQueryBuilder();

        return $queryBuilder->select('uid', 'pid')
            ->from($this->table)
            ->where(
                $queryBuilder->expr()->in('pid', $rootPageIds)
            )->groupBy('uid', 'pid', 'sorting')
            ->orderBy('pid')
            ->addOrderBy('sorting')
            ->execute()->fetchAll();
    }