/// <summary> /// Initializes a new instance of the <see cref="DataflowRetrievalEngine"/> class. /// </summary> /// <param name="mappingStoreDb"> /// The mapping store DB. /// </param> /// <param name="filter"> /// The filter. (Optional defaults to <see cref="DataflowFilter.Production"/> /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="mappingStoreDb"/> is null. /// </exception> public DataflowRetrievalEngine(Database mappingStoreDb, DataflowFilter filter = DataflowFilter.Production) : base(mappingStoreDb) { this._artefactCommandBuilder = new DataflowCommandBuilder(mappingStoreDb, filter); var sqlQueryBuilder = new ReferencedSqlQueryBuilder(this.MappingStoreDb, null); this._keyFamilyRefQuery = sqlQueryBuilder.Build(DataflowConstant.KeyFamilyRefQueryFormat); this._keyFamilyRefCommandBuilder = new ItemCommandBuilder(this.MappingStoreDb); ArtefactSqlBuilder dataflowBuilder; ArtefactSqlBuilder latestBuilder; switch (filter) { case DataflowFilter.Any: dataflowBuilder = new ArtefactSqlBuilder(); latestBuilder = new ArtefactSqlBuilder(null, VersionQueryType.Latest); break; case DataflowFilter.Production: dataflowBuilder = new ArtefactSqlBuilder(null, VersionQueryType.All, DataflowConstant.ProductionWhereLatestClause); latestBuilder = new ArtefactSqlBuilder(null, VersionQueryType.Latest, DataflowConstant.ProductionWhereLatestClause); break; default: throw new ArgumentOutOfRangeException("filter"); } this._sqlQueryInfo = dataflowBuilder.Build(DataflowConstant.TableInfo); this._sqlQueryInfoLatest = latestBuilder.Build(DataflowConstant.TableInfo); }
/// <summary> /// Initializes a new instance of the <see cref="RetrievalEngineContainer"/> class. /// </summary> /// <param name="mappingStoreDB"> /// The mapping Store DB. /// </param> public RetrievalEngineContainer(Database mappingStoreDB) { DataflowFilter filter = ConfigManager.Config.DataflowConfiguration.IgnoreProductionForStructure ? DataflowFilter.Any : DataflowFilter.Production; this._categorisationRetrievalEngine = new CategorisationRetrievalEngine(mappingStoreDB, filter); this._categorySchemeRetrievalEngine = new CategorySchemeRetrievalEngine(mappingStoreDB); this._codeListRetrievalEngine = new CodeListRetrievalEngine(mappingStoreDB); this._conceptSchemeRetrievalEngine = new ConceptSchemeRetrievalEngine(mappingStoreDB); this._dataflowRetrievalEngine = new DataflowRetrievalEngine(mappingStoreDB, filter); this._dsdRetrievalEngine = new DsdRetrievalEngine(mappingStoreDB); this._hclRetrievalEngine = new HierarchicalCodeListRetrievealEngine(mappingStoreDB); this._partialCodeListRetrievalEngine = new PartialCodeListRetrievalEngine(mappingStoreDB); this._agencySchemeListRetrievalEngine = new AgencySchemeRetrievalEngine(mappingStoreDB); this._organisationUnitSchemeListRetrievalEngine = new OrganisationUnitSchemeRetrievalEngine(mappingStoreDB); this._dataProviderSchemeListRetrievalEngine = new DataProviderSchemeRetrievalEngine(mappingStoreDB); this._dataConsumerSchemeListRetrievalEngine = new DataConsumerSchemeRetrievalEngine(mappingStoreDB); this._structureSetRetrievalEngine = new StructureSetRetrievalEngine(mappingStoreDB); this._contentConstraintListRetrievalEngine = new ContentConstraintRetrievalEngine(mappingStoreDB); }
/// <summary> /// Initializes a new instance of the <see cref="DataflowCommandBuilder"/> class. /// </summary> /// <param name="mappingStoreDb"> /// The mapping store DB. /// </param> /// <param name="filter"> /// The filter. (Optional defaults to <see cref="DataflowFilter.Production"/> /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="mappingStoreDb"/> is null /// </exception> public DataflowCommandBuilder(Database mappingStoreDb, DataflowFilter filter = DataflowFilter.Production) : base(mappingStoreDb) { this._filter = filter; }
/// <summary> /// Initializes a new instance of the <see cref="CategorisationRetrievalEngine"/> class. /// </summary> /// <param name="mappingStoreDb"> /// The mapping store DB. /// </param> /// <param name="filter"> /// The dataflow PRODUCTION filter. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="mappingStoreDb"/> is null. /// </exception> public CategorisationRetrievalEngine(Database mappingStoreDb, DataflowFilter filter) : base(mappingStoreDb) { this._authReferenceCommandBuilder = new AuthReferenceCommandBuilder(mappingStoreDb, filter); }
/// <summary> /// Initializes a new instance of the <see cref="AuthReferenceCommandBuilder"/> class. /// </summary> /// <param name="mappingStoreDb"> /// The mapping store DB. /// </param> /// <param name="filter"> /// The dataflow filter. /// </param> public AuthReferenceCommandBuilder(Database mappingStoreDb, DataflowFilter filter) { this._mappingStoreDb = mappingStoreDb; this._filter = filter; }