Active record Unit of Work class and Identity Map.
Maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems.
This registry keeps track of everything you do during a business transaction that can affect the database. When you're done, it figures out everything that needs to be done to alter the database as a result of your work.
The object can only be in one of the four states: "new", "clean", "dirty" or "removed". A "new" object is one that is created not by loading the record from database. A "clean" object is one that is created by loading the record from datase. A "dirty" object is one that is marked as dirty or a "clean" object that has its internal state altered (done by using == object comparision). A "removed" object is one that is marked for deletion.
See the "Active Record Object States.png" in the docs directory for state transition diagram.
Located in /Data/ActiveRecord/TActiveRecordStateRegistry.php (line 38)
Initialize the registry.
Ensure that object is not null.
Commit the object to database: * a new record is inserted if the object is new, object becomes clean.
* the record is updated if the object is dirty, object becomes clean. * the record is deleted if the object is marked for removal.
Test whether an object is in the clean state.
Test whether an object is dirty or has been modified.
Test whether an object is a new instance.
Test whether an object is marked for deletion.
Register a clean object attached to a specific data that was used to populate the object. This acts as an object cache.
Register the object for deletion, when the object invokes its delete() method the corresponding row in the database is deleted.
Remove object from dirty and clean state.
Remove object from removed state.
Documentation generated on Sun, 30 Sep 2007 19:10:33 -0400 by phpDocumentor 1.3.0RC4