protected function initialize()
    {
        if ($this->isInitialized) {
            return;
        }
        if (!$this->dbAdapter instanceof Adapter) {
            throw new \Exception('No db adapter present');
        }
        if (!$this->hydrator instanceof HydratorInterface) {
            $this->hydrator = new ClassMethods;
        }
        if (!is_object($this->entityPrototype)) {
            throw new \Exception('No entity prototype set');
        }

        $this->isInitialized = true;
    }