Skip to content

DynamicallyCalculatedBalanceInfoFactory

DynamicallyCalculatedBalanceInfoFactory is a factory class that computes balance values at runtime rather than reading a stored value. It executes the SQL (or stored procedure name) stored in BALANCE_TYPE_CODE.GET_BALANCE_SQL_TXT against the Oracle database and returns a DynamicallyCalculatedBalanceInfo result.

Purpose

  • Execute dynamically configured balance SQL at runtime for a given balance type.
  • Decouple balance calculation logic from hardcoded SQL — the calculation query is configured in the BALANCE_TYPE_CODE table.
  • Return a DynamicallyCalculatedBalanceInfo instance holding the computed result.

Context

  • Namespace: SAIF.Business.Payment.EFT
  • Assembly/package: SAIF.BOF.Business.Payment.EFT (NuGet)
  • Inherits: clsBusinessBase (SAIF.BOF.Framework)*
  • Note: Not a standard IBusinessCriteria object; does not use the standard BOF CRUD SQL properties.*

Public members

Member Signature Purpose
GetBalances Public Function GetBalances(inPolicyNumber As Decimal, inBalanceType As IBalanceType) As IEnumerable(Of IDynamicallyCalculatedBalanceInfo) Executes the dynamic balance SQL for the given policy number and balance type, adjusting for any pending payment allocations, and returns the resulting balance objects.

Public members

Member Signature Purpose
New Public Sub New(inDPI As IDataPortalInfo, inNonWarehousedPendingOnlinePayments As IEnumerable(Of IOnlinePayment)) Constructs the factory with a data portal reference and a collection of non-warehoused pending online payments for adjustment.
GetBalances Public Function GetBalances(inPolicyNumber As Decimal, inBalanceType As IBalanceType) As IEnumerable(Of IDynamicallyCalculatedBalanceInfo) Executes the dynamic balance SQL for the given policy number and balance type, adjusting for any pending payment allocations, and returns the resulting balance objects.

Behavioral notes

  • Reads BALANCE_TYPE_CODE.GET_BALANCE_SQL_TXT to obtain the SQL text or stored procedure name.*
  • Executes the obtained SQL dynamically via the BOF data portal; the exact SQL cannot be documented from source code alone.*
  • Returns a DynamicallyCalculatedBalanceInfo result object.*

Constraints and usage notes

  • The specific SQL executed is configuration-driven; changes to BALANCE_TYPE_CODE records affect runtime behavior.*
  • Not a standard persisted business object; the standard BOF CRUD lifecycle does not apply.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • Business\SAIF.Business.Payment.EFT\DynamicallyCalculatedBalanceInfoFactory.vb
  • Business\SAIF.Business.Payment.EFT\DynamicallyCalculatedBalanceInfo.vb