Development Doctrine_Connection_UnitOfWork
Doctrine Connection UnitOfWork
The UnitOfWork is responsible for tracking changes to objects during an "object-level" transaction and for writing out changes to the database in the correct order.
Method Summary
| Returns | Name | Description |
|---|---|---|
| boolean | addToIdentityMap | Note that entities in a hierarchy are registered with the class name of the root entity. |
| close | ||
| commit | ||
| boolean | containsIdHash | |
| delete | ||
| boolean | detach | |
| integer | detachAll | Alternatively, if an entity class name is given, all entities of that type (or subtypes) are detached. Don't forget that entities are registered in the identity map with the name of the root entity class. So calling detachAll() with a class name t |
| Doctrine::ORM::Entity | getByIdHash | |
| getCommitOrderCalculator | ||
| string | getIdentifierHash | The hash is just a concatenation of the identifier values. The identifiers are concatenated with a space. Note that this method always returns a string. If the given array is empty, an empty string is returned. |
| string | getIdentityMap | |
| unknown | isEntityRegistered | |
| boolean | isInIdentityMap | |
| boolean | isRegisteredDirty | Note: Is not very useful currently as dirty entities are only registered at commit time. |
| boolean | isRegisteredNew | |
| boolean | isRegisteredRemoved | |
| registerClean | The entity is simply put into the identity map. | |
| registerDeleted | ||
| registerDirty | ||
| registerNew | ||
| unknown | removeFromIdentityMap | |
| save | ||
| tryGetByIdHash | ||
| __construct | Creates a new UnitOfWork. |
Method Details
-
$entity The entity to register. (boolean) addToIdentityMap(( ) $entity)
Registers an entity in the identity map.
Note that entities in a hierarchy are registered with the class name of the root entity.
Doctrine_Connection_UnitOfWork
-
close()
-
commit()
Commits the unit of work, executing all operations that have been postponed up to this point.
-
(boolean) containsIdHash($idHash, $rootClassName)
Checks whether an identifier hash exists in the identity map.
-
delete(( ) $entity)
Deletes an entity as part of the current unit of work.
-
$oid object identifier (boolean) detach(( ) $entity, $oid)
Detaches an entity from the persistence management. It's persistence will no longer be managed by Doctrine.
Doctrine_Connection_UnitOfWork
-
(integer) detachAll($entityName = null)
Detaches all currently managed entities.
Alternatively, if an entity class name is given, all entities of that type (or subtypes) are detached. Don't forget that entities are registered in the identity map with the name of the root entity class. So calling detachAll() with a class name t
Doctrine_Connection_UnitOfWork
-
(Doctrine::ORM::Entity) getByIdHash($idHash, $rootClassName)
Finds an entity in the identity map by its identifier hash.
-
getCommitOrderCalculator()
-
(string) getIdentifierHash($id)
Gets the identifier hash for a set of identifier values.
The hash is just a concatenation of the identifier values. The identifiers are concatenated with a space.
Note that this method always returns a string. If the given array is empty, an empty string is returned.Doctrine_Connection_UnitOfWork
-
$table The table from which the records are going to be deleted. $numRecords The number of records that are going to be deleted. (string) getIdentityMap((Doctrine_Table) $table, $numRecords)
Builds the SQL condition to target multiple records who have a composite primary key.
Doctrine_Connection_UnitOfWork
-
(unknown) isEntityRegistered(( ) $entity)
Enter description here...
-
(boolean) isInIdentityMap(( ) $entity)
Checks whether an entity is registered in the identity map of the UnitOfWork.
-
(boolean) isRegisteredDirty(( ) $entity)
Checks whether an entity is registered as dirty in the unit of work.
Note: Is not very useful currently as dirty entities are only registered at commit time.
-
(boolean) isRegisteredNew(( ) $entity)
Checks whether an entity is registered as new on the unit of work.
-
(boolean) isRegisteredRemoved(( ) $entity)
Checks whether an entity is registered as removed/deleted with the unit of work.
-
registerClean(( ) $entity)
Registers a clean entity.
The entity is simply put into the identity map.
-
registerDeleted(( ) $entity)
Registers a deleted entity.
-
registerDirty(( ) $entity)
Registers a dirty entity.
-
registerNew(( ) $entity)
Register a new entity.
-
(unknown) removeFromIdentityMap(( ) $entity)
Removes an entity from the identity map.
-
$entity The entity to save. save(( ) $entity)
Saves an entity as part of the current unit of work.
-
tryGetByIdHash($idHash, $rootClassName)
-
__construct(( ) $em)
Constructor.
Creates a new UnitOfWork.




Comments (0) [ add comment ]
No Comments
Add Comment