public function has($class, $entityId)
    {
        try {
            $em = $this->entityManager->getDoctrineEntityManager();
            $data = $em->getRepository($class)->findOneBy(array(
                'id' => $entityId,
            ));
             
            if ($data !== null) {
                return true;
            }
             
            return false;
        } catch (\Exception $e) {
            throw new Exception('Cannot check if there is an access entitiy for the given class "' . $class . '" and id "' . $entityId . '".', 0, $e);
        }
    }