public function setPool(Pool $pool)
    {
        $this->pool = $pool;

        foreach ($this->poolRepositories as $repo) {
            $pool->addRepository($repo);
        }

        $this->poolRepositories = array();

        return $this;
    }