Skip to content

Save (insert/update) a class coverage line

Premium recalculation or manual premium maintenance saves a premium set

Field Value
Operation ID OP-003
Trigger Premium recalculation or manual premium maintenance saves a premium set
Inputs The dirty clsClassCoverage instance
Outputs Persisted row; sequence-assigned key on insert
Primary components clsClassCoverage insert/update lifecycle
Entry point Business\SAIF.Business.Policy.Premium\clsClassCoverage.vb

Steps

  1. On insert, clsClassCoverage.GetNextClassCoverageSeq executes a direct scalar statement against CLASS_COVERAGE_SEQ.NEXTVAL (optionally @POLDB) to obtain the new key.
  2. Business rules BR-001, BR-002, BR-003, BR-004, BR-005, BR-006, BR-007 are evaluated; if IsValid is false the save is refused by the framework.*
  3. BeforeInsert / BeforeUpdate build the portal request from Criteria.InsertSQL / Criteria.UpdateSQL and add parameters. (SQL: PREM_HIST_CLASS_COVERAGE.)
  4. ProcessPortalRequest executes the statement.
  5. AfterInsert / AfterUpdate check RowsAffected; when RowsAffected <> 1 the code calls AddErrorMessage(..., BOC.Messages.DBContentionError), signalling an optimistic-concurrency failure.
  6. MarkOld() resets the entity state on success.

Process flow

The following diagram visualizes this operation's control flow.


flowchart TD

    Start([Trigger]) --> S1[Step 1]

    S1 --> S2[Step 2]

    S2 --> EndOk([Outputs returned])

Failure and edge-case behavior

  • See the linked rules and SQL references above for validation failures, null-handling, and persistence contention behavior.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Business\SAIF.Business.Policy.Premium\clsClassCoverage.vb
  • Business\SAIF.Business.Policy.Premium\clsClassCoverageBase.vb