public function findOne(string $name, string $resourceId): Model
    {
        return $this->getRepository($name)
            ->query()
            ->setResourceId($resourceId)
            ->findOne();
    }
public function findOne(string $name, string $resourceId): Model
    {
        return $this->getRepository($name)
            ->query()
            ->setResourceId($resourceId)
            ->findOne();
    }
public function findOne ( string $ name , string $ resourceId ) : Model { return $ this -> getRepository ( $ name ) -> query ( ) -> setResourceId ( $ resourceId ) -> findOne ( ) ; }
Shortcut for finding a single element.

@param string $name
@param string $resourceId

@return Model
Shortcut for finding a single element .