Commit d0552225 authored by romanb's avatar romanb

moved id generators

parent 43e35d3b
...@@ -792,13 +792,13 @@ class Doctrine_ClassMetadata implements Doctrine_Configurable, Serializable ...@@ -792,13 +792,13 @@ class Doctrine_ClassMetadata implements Doctrine_Configurable, Serializable
protected function _createIdGenerator() protected function _createIdGenerator()
{ {
if ($this->_generatorType == self::GENERATOR_TYPE_IDENTITY) { if ($this->_generatorType == self::GENERATOR_TYPE_IDENTITY) {
$this->_idGenerator = new Doctrine_Id_IdentityGenerator($this->_em); $this->_idGenerator = new Doctrine_ORM_Id_IdentityGenerator($this->_em);
} else if ($this->_generatorType == self::GENERATOR_TYPE_SEQUENCE) { } else if ($this->_generatorType == self::GENERATOR_TYPE_SEQUENCE) {
$this->_idGenerator = new Doctrine_Id_SequenceGenerator($this->_em); $this->_idGenerator = new Doctrine_ORM_Id_SequenceGenerator($this->_em);
} else if ($this->_generatorType == self::GENERATOR_TYPE_TABLE) { } else if ($this->_generatorType == self::GENERATOR_TYPE_TABLE) {
$this->_idGenerator = new Doctrine_Id_TableGenerator($this->_em); $this->_idGenerator = new Doctrine_ORM_Id_TableGenerator($this->_em);
} else { } else {
$this->_idGenerator = new Doctrine_Id_Assigned($this->_em); $this->_idGenerator = new Doctrine_ORM_Id_Assigned($this->_em);
} }
} }
......
...@@ -638,7 +638,7 @@ class Doctrine_Connection_UnitOfWork ...@@ -638,7 +638,7 @@ class Doctrine_Connection_UnitOfWork
break; break;
case Doctrine_Entity::STATE_NEW: case Doctrine_Entity::STATE_NEW:
$result = $class->getIdGenerator()->generate($entity); $result = $class->getIdGenerator()->generate($entity);
if ($result == Doctrine_Id_AbstractIdGenerator::POST_INSERT_INDICATOR) { if ($result == Doctrine_ORM_Id_AbstractIdGenerator::POST_INSERT_INDICATOR) {
$insertNow[$entity->getOid()] = $entity; $insertNow[$entity->getOid()] = $entity;
} else { } else {
$entity->_assignIdentifier($result); $entity->_assignIdentifier($result);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* @todo Rename to AbstractIdGenerator * @todo Rename to AbstractIdGenerator
*/ */
abstract class Doctrine_Id_AbstractIdGenerator abstract class Doctrine_ORM_Id_AbstractIdGenerator
{ {
const POST_INSERT_INDICATOR = 'POST_INSERT_INDICATOR'; const POST_INSERT_INDICATOR = 'POST_INSERT_INDICATOR';
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* @since 2.0 * @since 2.0
*/ */
class Doctrine_Id_Assigned extends Doctrine_Id_AbstractIdGenerator class Doctrine_ORM_Id_Assigned extends Doctrine_ORM_Id_AbstractIdGenerator
{ {
/** /**
* Enter description here... * Enter description here...
......
<?php <?php
class Doctrine_Id_IdentityGenerator extends Doctrine_Id_AbstractIdGenerator class Doctrine_ORM_Id_IdentityGenerator extends Doctrine_ORM_Id_AbstractIdGenerator
{ {
/** /**
* Enter description here... * Enter description here...
......
<?php <?php
class Doctrine_Id_SequenceGenerator extends Doctrine_Id_AbstractIdGenerator class Doctrine_ORM_Id_SequenceGenerator extends Doctrine_ORM_Id_AbstractIdGenerator
{ {
private $_sequenceName; private $_sequenceName;
......
<?php <?php
class Doctrine_Id_SequenceIdentityGenerator extends Doctrine_Id_IdentityGenerator class Doctrine_ORM_Id_SequenceIdentityGenerator extends Doctrine_ORM_Id_IdentityGenerator
{ {
private $_sequenceName; private $_sequenceName;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* @since 2.0 * @since 2.0
*/ */
class Doctrine_Id_TableGenerator extends Doctrine_Id_AbstractIdGenerator class Doctrine_ORM_Id_TableGenerator extends Doctrine_ORM_Id_AbstractIdGenerator
{ {
public function generate(Doctrine_Entity $entity) public function generate(Doctrine_Entity $entity)
......
...@@ -6,7 +6,7 @@ class Doctrine_ClassMetadataMock extends Doctrine_ClassMetadata ...@@ -6,7 +6,7 @@ class Doctrine_ClassMetadataMock extends Doctrine_ClassMetadata
/* Mock API */ /* Mock API */
public function setIdGenerator(Doctrine_Id_AbstractIdGenerator $g) { public function setIdGenerator(Doctrine_ORM_Id_AbstractIdGenerator $g) {
$this->_idGenerator = $g; $this->_idGenerator = $g;
} }
......
<?php <?php
class Doctrine_SequenceMock extends Doctrine_Id_SequenceGenerator class Doctrine_SequenceMock extends Doctrine_ORM_Id_SequenceGenerator
{ {
private $_sequenceNumber = 0; private $_sequenceNumber = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment