pub struct EntityRegistryManager { /* private fields */ }Expand description
Entity Registry Manager for coordinated master data generation.
Implementations§
Source§impl EntityRegistryManager
impl EntityRegistryManager
Sourcepub fn with_config(seed: u64, config: EntityRegistryManagerConfig) -> Self
pub fn with_config(seed: u64, config: EntityRegistryManagerConfig) -> Self
Create a new entity registry manager with custom configuration.
Sourcepub fn generate_master_data(
&mut self,
company_code: &str,
counts: &MasterDataCounts,
effective_date: NaiveDate,
date_range: (NaiveDate, NaiveDate),
) -> GeneratedMasterData
pub fn generate_master_data( &mut self, company_code: &str, counts: &MasterDataCounts, effective_date: NaiveDate, date_range: (NaiveDate, NaiveDate), ) -> GeneratedMasterData
Generate all master data for a company.
Sourcepub fn generate_multi_company_master_data(
&mut self,
company_codes: &[String],
counts: &MasterDataCounts,
effective_date: NaiveDate,
date_range: (NaiveDate, NaiveDate),
) -> Vec<GeneratedMasterData>
pub fn generate_multi_company_master_data( &mut self, company_codes: &[String], counts: &MasterDataCounts, effective_date: NaiveDate, date_range: (NaiveDate, NaiveDate), ) -> Vec<GeneratedMasterData>
Generate master data for multiple company codes.
Sourcepub fn generate_master_data_with_ic(
&mut self,
company_codes: &[String],
counts: &MasterDataCounts,
effective_date: NaiveDate,
date_range: (NaiveDate, NaiveDate),
) -> Vec<GeneratedMasterData>
pub fn generate_master_data_with_ic( &mut self, company_codes: &[String], counts: &MasterDataCounts, effective_date: NaiveDate, date_range: (NaiveDate, NaiveDate), ) -> Vec<GeneratedMasterData>
Generate master data with intercompany relationships.
Sourcepub fn registry(&self) -> &EntityRegistry
pub fn registry(&self) -> &EntityRegistry
Get the entity registry.
Sourcepub fn validate_entity(
&self,
entity_type: EntityType,
entity_id: &str,
transaction_date: NaiveDate,
) -> bool
pub fn validate_entity( &self, entity_type: EntityType, entity_id: &str, transaction_date: NaiveDate, ) -> bool
Validate that an entity exists on a given date.
Sourcepub fn get_active_entities(
&self,
entity_type: EntityType,
date: NaiveDate,
) -> Vec<EntityId>
pub fn get_active_entities( &self, entity_type: EntityType, date: NaiveDate, ) -> Vec<EntityId>
Get active entities of a type on a given date.
Sourcepub fn get_random_vendor(
&self,
company_code: &str,
date: NaiveDate,
rng: &mut impl Rng,
) -> Option<String>
pub fn get_random_vendor( &self, company_code: &str, date: NaiveDate, rng: &mut impl Rng, ) -> Option<String>
Get a random active vendor for a company on a date.
Auto Trait Implementations§
impl Freeze for EntityRegistryManager
impl RefUnwindSafe for EntityRegistryManager
impl Send for EntityRegistryManager
impl Sync for EntityRegistryManager
impl Unpin for EntityRegistryManager
impl UnwindSafe for EntityRegistryManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more