private function getLanguageQuery()
    {
        $languageQuery = $this->dbHandler->createSelectQuery();
        $languageQuery
            ->select(
                $languageQuery->expr->searchedCase(
                    [
                        $languageQuery->expr->lAnd(
                            $languageQuery->expr->eq(
                                $this->dbHandler->quoteColumn('initial_language_id'),
                                ':languageId'
                            ),
                            // wrap bitwise check into another "neq" to provide cross-DBMS compatibility
                            $languageQuery->expr->neq(
                                $languageQuery->expr->bitAnd(
                                    $this->dbHandler->quoteColumn('language_mask'),
                                    ':languageId'
                                ),
                                0
                            )
                        ),
                        $languageQuery->expr->bitOr(
                            ':languageId',
                            1
                        ),
                    ],
                    ':languageId'
                )
            )
            ->from('ezcontentobject')
            ->where(
                $languageQuery->expr->eq(
                    'id',
                    ':contentId'
                )
            );

        return $languageQuery;
    }