Class Xyster_Orm_WorkUnit

Description

A transactional unit of work

Fowler describes a unit of work as "[Maintaining] a list of objects affected by a business transaction and [coordinating] the writing out of changes and the resolution of concurrency problems." http://martinfowler.com/eaaCatalog/unitOfWork.html

  • copyright: Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net)
  • license: New BSD License

Located in /Orm/WorkUnit.php (line 33)


	
			
Variable Summary
Method Summary
Xyster_Orm_WorkUnit __construct ()
void commit (Xyster_Orm_Manager $manager)
void registerNew (Xyster_Orm_Entity $entity)
void rollback ()
Variables
Xyster_Collection_Set $_dirty (line 40)

Entities that are in queue for update

  • access: protected
Xyster_Collection_Set $_new (line 47)

Entities that are in queue for insertion

  • access: protected
Xyster_Collection_Set $_removed (line 54)

Entities that are in queue for removal

  • access: protected
Methods
Constructor __construct (line 60)

Creates a new Xyster_Orm_WorkUnit object

  • access: public
Xyster_Orm_WorkUnit __construct ()
commit (line 72)

Execute pending transactions

  • access: public
void commit (Xyster_Orm_Manager $manager)
registerDirty (line 128)

Register an entity as dirty

  • throws: Xyster_Orm_Exception if the entity can't be set as dirty
  • access: public
void registerDirty (Xyster_Orm_Entity $entity)
registerNew (line 111)

Register an entity as in queue for insertion

  • throws: Xyster_Orm_Exception if the entity is already registered
  • access: public
void registerNew (Xyster_Orm_Entity $entity)
registerRemoved (line 147)

Register an entity as in queue for removal

  • access: public
void registerRemoved (Xyster_Orm_Entity $entity)
rollback (line 162)

Cancel any pending changes

Any entity objects still in memory will remain in a modified state, but will not be committed to the data store.

  • access: public
void rollback ()

Documentation generated on Mon, 19 May 2008 17:07:44 -0400 by phpDocumentor 1.4.2