private function createNodeQueryBuilder(array $translations = null, bool $useAlwaysAvailable = true): QueryBuilder
    {
        $queryBuilder = $this->connection->createQueryBuilder();
        $queryBuilder
            ->select('t.*')
            ->from('ezcontentobject_tree', 't');

        if (!empty($translations)) {
            $dbPlatform = $this->connection->getDatabasePlatform();
            $expr = $queryBuilder->expr();
            $mask = $this->languageMaskGenerator->generateLanguageMaskFromLanguageCodes(
                $translations,
                $useAlwaysAvailable
            );

            $queryBuilder->innerJoin(
                't',
                'ezcontentobject',
                'c',
                $expr->andX(
                    $expr->eq('t.contentobject_id', 'c.id'),
                    $expr->gt(
                        $dbPlatform->getBitAndComparisonExpression('c.language_mask', $mask),
                        0
                    )
                )
            );
        }

        return $queryBuilder;
    }