SAIF output-address retrieval¶
This operation loads all XSAIF LOCATION rows into a single clsSAIFOutputAddress object. The result centralizes configured output addresses such as return mail, EFT, and customer-service destinations.
| Field | Value |
|---|---|
| Operation ID | OP-SB-06 |
| Trigger | Caller invokes GetSAIFOutputAddresses. |
| Inputs | Data portal info |
| Outputs | clsSAIFOutputAddress |
| Primary components | clsSAIFOutputAddress.GetSAIFOutputAddresses, clsSAIFOutputAddress.Criteria.BeforeRetrieve, clsSAIFOutputAddress.AfterRetrieve, clsSAIFOutputAddress.GetFormattedAddress |
| Entry point | Business\SAIF.Business\clsSAIFOutputAddress.vb |
Steps¶
GetSAIFOutputAddressescreates criteria for the fixed company codeXSAIFand submits a retrieval request.- The criteria query every
LOCATIONrow for that company and return the ordered result set to the business object (SQL-033, LOCATION). AfterRetrieveiterates through the returned rows, maps each location name to the library's address-description enum, and stores the correspondingclsAddressobject in the address dictionary (SQL-033, LOCATION).- The object marks itself invalid when no qualifying rows were returned, enforcing the requirement that at least one
XSAIFaddress must exist (BR-SB-009). - Consumers call
GetAddressorGetFormattedAddressto retrieve either the structuredclsAddressor a newline-formatted mailing block for a specific destination.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Output-address request]) --> Query[Query LOCATION rows for XSAIF]
Query --> Rows{Rows returned?}
Rows -->|No| Invalid([Return invalid object])
Rows -->|Yes| Map[Map rows to address descriptions]
Map --> Format[Expose structured or formatted addresses]
Format --> End([Return output-address object])
Failure and edge-case behavior¶
- When the query returns no
XSAIFrows, the object is invalid by design (BR-SB-009). - Unknown or unmapped location descriptions are ignored unless the caller requests that specific address later.
Related documentation¶
Sources¶
Business\SAIF.Business\clsSAIFOutputAddress.vb