ores.refdata.business_centre

Table of Contents

Business centres identify financial trading locations used for holiday calendar determination (e.g. "USNY" for New York, "GBLO" for London), using FpML-style codes. Each code is unique per tenant regardless of coding scheme (e.g. FpML vs ISDA) – matching party_id_scheme's code-only primary key – and optionally linked to a country for flag-icon display in the UI. Referenced by business_unit as a soft FK.

1. Flags

2. Columns

2.1. code

FpML-style business centre code.

Examples: 'USNY' (New York), 'GBLO' (London).

std::string(faker::word::noun()) + "_bc"

2.2. source

Data source identifier (e.g. "FpML", "ISDA").

std::string("FpML")

2.3. description

Human-readable description of the business centre.

std::string(faker::lorem::sentence())

2.4. city_name

City name derived from description.

std::string(faker::location::city())

2.5. country_alpha2_code

ISO 3166-1 alpha-2 code of the country. Soft FK to country.alpha2_code.

std::string("US")

2.6. coding_scheme_code

Code of the coding scheme this business centre belongs to (e.g. FpML vs ISDA). Soft FK to ores_dq_coding_schemes_tbl, validated by ores_refdata_validate_business_centre_coding_scheme_fn.

// "FPML_BUSINESS_CENTER" is only seeded by the optional FpML coding-
// scheme dataset. "NONE" is the one guaranteed seeded by the base
// bootstrap (see dq_coding_scheme_populate.sql -- the same code the
// system-tenant WRLD business centre row itself uses).
std::string("NONE")

3. Artefact columns

The import carries the FpML business centre scheme: a code, its source and description, an optional flag image and the coding scheme. Publishing writes the code, scheme, source and description. It does not publish the flag image, and it leaves the city and the country, which the scheme does not carry, empty.

3.1. code

3.2. version

3.3. source

3.4. description

3.5. image_id

3.6. coding_scheme_code

4. Artefact indexes

4.1. coding_scheme

5. SQL

5.1. Flags

5.2. Extra drops

drop function if exists ores_refdata_validate_business_centre_coding_scheme_fn;

6. Validation function

7. Insert trigger

7.1. Validations

column validation_function
country_alpha2_code ores_refdata_validate_country_fn
coding_scheme_code ores_refdata_validate_business_centre_coding_scheme_fn
change_reason_code ores_dq_validate_change_reason_fn

8. C++

8.1. Flags

8.2. Repository

8.3. Domain includes

#include "ores.utility/uuid/tenant_id.hpp"
#include <boost/uuid/uuid.hpp>
#include <string>

8.4. Entity includes

#include <optional>
#include <string>

8.5. Conventions

8.6. Table display

column header
code Code
source Source
description Description
city_name City
coding_scheme_code Coding Scheme
country_alpha2_code Country
modified_by Modified By
version Version

8.7. Presentation

8.7.1. Detail fields

field label widget type is_key is_required placeholder flag_source combo_fetch combo_fetch_include combo_allow_blank immutable combo_domain_type combo_fetch_fn combo_watcher_name combo_code_field combo_tooltip_field combo_sort_field combo_label combo_setter_pascal
code Code codeEdit line_edit true true e.g. USNY                          
source Source sourceEdit line_edit     e.g. FpML                          
description Description descriptionEdit line_edit     Short description                          
city_name City cityNameEdit line_edit               true                
coding_scheme_code Coding Scheme codingSchemeCombo dynamic_combo   true             dq::domain::coding_scheme fetch_coding_schemes codingSchemeWatcher code description version coding schemes CodingSchemeCombo
country_alpha2_code Country countryAlpha2Combo flagged_combo       country fetch_country_codes   true                  

8.7.2. Columns

enum_name field header type width
Code code Code string 100
Source source Source string 100
Description description Description string 250
CityName city_name City string 150
CodingSchemeCode coding_scheme_code Coding Scheme string 120
CountryAlpha2Code country_alpha2_code Country string 90
Version version Version int 80
ModifiedBy modified_by Modified By string 120
RecordedAt recorded_at Recorded At timestamp 150

8.7.3. Icon columns

Country gets its own flag icon in the list, keyed by country_alpha2_code via the generic country-code accessor (same mechanism as Book's FunctionalCurrency currency flag) – business_centre has no image_id of its own (dropped in favour of this country-derived flag), so it uses icon_columns rather than the single flag_icon_column mechanism.

column accessor field1 field2
CountryAlpha2Code country_flag_icon country_alpha2_code  

8.8. Custom repository methods

9. Notes

  • city_name is documented as "derived from description" and is currently always read-only in the hand-written dialog (immutable: true above matches that). Confirm during reconciliation whether any derivation logic needs preserving via a custom paste block, or whether it is simply hand-entered data with no live derivation (the domain comment may be aspirational/stale – appraise during regeneration).

10. See also

Emacs 29.3 (Org mode 9.6.15)