Standard BOF persistence lifecycle¶
The library's inline-SQL business entities (e.g. clsLegalSchedule, clsAppeal, clsAppealExtension)
follow the standard SAIF BOF framework persistence lifecycle: each entity exposes Create()/Save()/
Delete() operations that resolve to Criteria-defined SQL properties and the framework's
Before*/After* hook pattern.
| Field | Value |
|---|---|
| Operation ID | standard-bof-persistence-lifecycle |
| Trigger | Save() / Create() / Delete() on any entity |
| Inputs | Entity property values |
| Outputs | Persisted row, RowsAffected contention check |
| Primary components | Each entity's BeforeInsert/AfterInsert/BeforeUpdate/AfterUpdate/BeforeDelete/AfterDelete overrides |
| Entry point | Per-entity .vb source files (see SQL catalog for the per-class Criteria SQL properties) |
Steps¶
- A caller calls
Create(),Save(), or the entity's own delete method. - The framework's inherited data-portal machinery routes the call to the appropriate Criteria SQL property (Insert/Update/Delete) generated for the entity.
Before*hooks (BeforeInsert/BeforeUpdate/BeforeDelete) run first to prepare or validate the request.- The framework executes the resolved SQL/stored-procedure statement against Oracle.
After*hooks (AfterInsert/AfterUpdate/AfterDelete) run afterward. Each checksRowsAffected <> 1and raisesAddErrorMessage("InsertError"/"UpdateError"/"DeleteError", clsConstants.Messages.DBContentionError)when the check fails — the library-wide optimistic-concurrency (lost-update) control.- Unsupported CRUD operations on a
Criteriaclass throwNew ApplicationException(clsConstants.Messages.InvalidSQLProperty)rather than silently no-oping.
Process flow¶
flowchart TD
Start(["Create / Save /<br>Delete called"]) --> Before["Before* hook runs"]
Before --> Exec["Framework executes<br>Criteria SQL"]
Exec --> After["After* hook runs"]
After --> Check{"RowsAffected = 1?"}
Check -->|Yes| EndOk(["Persistence<br>succeeded"])
Check -->|No| Err(["Contention error<br>raised"])
Failure and edge-case behavior¶
RowsAffected <> 1in anyAfter*hook raises a contention error rather than silently succeeding.- Calling an unsupported CRUD operation on a
Criteriaclass throwsApplicationExceptionwithInvalidSQLProperty.
Related documentation¶
Sources¶
SAIF.Business.Claim.Legal\LegalNet\clsLegalSchedule.vbSAIF.Business.Claim.Legal\LegalNet\clsAppeal.vb