protected function setIdGenerator($generator)
    {
        if (is_string($generator)) {
            $generator = constant('Doctrine\ODM\PHPCR\Mapping\ClassMetadata::GENERATOR_TYPE_'.strtoupper($generator));
        }
        $this->idGenerator = $generator;
    }
protected function setIdGenerator($generator)
    {
        if (is_string($generator)) {
            $generator = constant('Doctrine\ODM\PHPCR\Mapping\ClassMetadata::GENERATOR_TYPE_'.strtoupper($generator));
        }
        $this->idGenerator = $generator;
    }
protected function setIdGenerator ( $ generator ) { if ( is_string ( $ generator ) ) { $ generator = constant ( 'Doctrine\ODM\PHPCR\Mapping\ClassMetadata::GENERATOR_TYPE_' . strtoupper ( $ generator ) ) ; } $ this -> idGenerator = $ generator ; }
Sets the ID generator used to generate IDs for instances of this class.

@param string $generator
Sets the ID generator used to generate IDs for instances of this class .