When a creation or updation or deletion of a row happens in ADF VO, the corresponding actual operations happen against the respective underlying entity instance. When a commit is initiated, the entity instance posts the changes to database and commits them. Below are the steps involved in transaction commit process.
Step1: When commit is initiated on the AM that contains the VO on which create/update/delete operations are done, The transaction manager starts the post cycle of all the entity instances which are dirty(either created/updated/deleted). Below steps are executed for each dirty entity instance.
- Validation of business data is triggered. (Entity level validations). EntityImpl::validateEntity()
- EntityImpl::postChanges(...) method is invoke which in turn invokes below methods.
Step1: When commit is initiated on the AM that contains the VO on which create/update/delete operations are done, The transaction manager starts the post cycle of all the entity instances which are dirty(either created/updated/deleted). Below steps are executed for each dirty entity instance.
- Validation of business data is triggered. (Entity level validations). EntityImpl::validateEntity()
- EntityImpl::postChanges(...) method is invoke which in turn invokes below methods.
- EntityImpl::lock() : Locks the row.
- EntityImpl::prepareForDML(...) : A pre-notification for preparing rows for posting to DB. If you need to update some dependency columns or custom history columns then this is the place to add that logic.
- EntityImpl::doDML(...) : Performs INSERT/UPDATE/DELETE processing for the row.
- EntityImpl::beforeCommit(...) : Reports that a commit operation has initiated
- EntityImpl::afterCommit(...) : Reports that a successful commit operation has occurred
No comments:
Post a Comment