/// <summary> /// Retrieve the <see cref="IDataStructureMutableObject"/> from Mapping Store. /// </summary> /// <param name="maintainableRef"> /// The maintainable reference which may contain ID, AGENCY ID and/or VERSION. /// </param> /// <param name="detail"> /// The <see cref="StructureQueryDetail"/> which controls if the output will include details or not. /// </param> /// <param name="versionConstraints"> /// The version query type. /// </param> /// <param name="allowedDataflows"> /// The allowed Dataflows. /// </param> /// <returns> /// The <see cref="ISet{IDataStructureMutableObject}"/>. /// </returns> public override ISet <ICategorisationMutableObject> Retrieve( IMaintainableRefObject maintainableRef, ComplexStructureQueryDetailEnumType detail, VersionQueryType versionConstraints, IList <IMaintainableRefObject> allowedDataflows) { var sqlInfo = versionConstraints == VersionQueryType.Latest ? this.SqlQueryInfoForLatest : this.SqlQueryInfoForAll; var categorisations = this.GetCategorisations(maintainableRef, ComplexStructureQueryDetailEnumType.Full, sqlInfo, allowedDataflows); NormalizeDetailLevel(detail, categorisations); return(categorisations); }
/// <summary> /// Initializes a new instance of the <see cref="ArtefactSqlBuilder"/> class. /// </summary> /// <param name="orderBy"> /// The order by. /// </param> /// <param name="versionQueryType"> /// The version Query Type. /// </param> /// <param name="latestConstraint"> /// The latest Constraint. Additional SQL WHERE clause which is used only when <paramref name="versionQueryType"/> equals <see cref="VersionQueryType.Latest"/>. /// Needs to start with the operator <c>AND</c>. /// </param> public ArtefactSqlBuilder(string orderBy = null, VersionQueryType versionQueryType = VersionQueryType.All, string latestConstraint = null) { this._orderBy = orderBy ?? OrderBy; this._latestConstraint = latestConstraint; switch (versionQueryType) { case VersionQueryType.All: this._queryFormat = SqlQueryFormat; this._whereStatus = WhereState.Nothing; break; case VersionQueryType.Latest: this._queryFormat = SqlLatestQueryFormat; this._whereStatus = WhereState.And; break; default: throw new ArgumentOutOfRangeException("versionQueryType"); } }
/// <summary> /// /// </summary> /// <param name="maintainableRef"></param> /// <param name="detail"></param> /// <param name="versionConstraints"></param> /// <returns></returns> public override ISet <IContentConstraintMutableObject> Retrieve(IMaintainableRefObject maintainableRef, ComplexStructureQueryDetailEnumType detail, VersionQueryType versionConstraints) { var sqlInfo = versionConstraints == VersionQueryType.Latest ? this.SqlQueryInfoForLatest : this.SqlQueryInfoForAll; return(this.GetConstraintMutableObjects(maintainableRef, detail, sqlInfo)); }
/// <summary> /// Retrieve the <see cref="IDataflowMutableObject"/> from Mapping Store. /// </summary> /// <param name="maintainableRef"> /// The maintainable reference which may contain ID, AGENCY ID and/or VERSION. /// </param> /// <param name="detail"> /// The <see cref="StructureQueryDetail"/> which controls if the output will include details or not. /// </param> /// <param name="versionConstraints"> /// The version query type /// </param> /// <param name="allowedDataflows"> /// The allowed Dataflows. /// </param> /// <returns> /// The <see cref="ISet{IDataflowMutableObject}"/>. /// </returns> public override ISet <IDataflowMutableObject> Retrieve(IMaintainableRefObject maintainableRef, ComplexStructureQueryDetailEnumType detail, VersionQueryType versionConstraints, IList <IMaintainableRefObject> allowedDataflows) { var dataflowMutableObjects = new HashSet <IDataflowMutableObject>(); var sqlQueryInfo = versionConstraints == VersionQueryType.Latest ? this._sqlQueryInfoLatest : this._sqlQueryInfo; var artefactSqlQuery = new ArtefactSqlQuery(sqlQueryInfo, maintainableRef); // do a security check. return(!SecurityHelper.Contains(allowedDataflows, maintainableRef) ? dataflowMutableObjects : this.RetrieveArtefacts(artefactSqlQuery, detail, query => this._artefactCommandBuilder.Build(query, allowedDataflows))); }
/// <summary> /// Retrieve the <see cref="IMaintainableMutableObject"/> from Mapping Store. /// </summary> /// <param name="maintainableRef"> /// The maintainable reference which may contain ID, AGENCY ID and/or VERSION. /// </param> /// <param name="detail"> /// The <see cref="StructureQueryDetail"/> which controls if the output will include details or not. /// </param> /// <param name="versionConstraints"> /// The version criteria /// </param> /// <returns> /// The <see cref="ISet{IMaintainableMutableObject}"/>. /// </returns> public override ISet <IDataflowMutableObject> Retrieve(IMaintainableRefObject maintainableRef, ComplexStructureQueryDetailEnumType detail, VersionQueryType versionConstraints) { return(this.Retrieve(maintainableRef, detail, versionConstraints, null)); }
/// <summary> /// Retrieve the set of <see cref="IMaintainableMutableObject"/> from Mapping Store. /// </summary> /// <param name="maintainableRef"> /// The maintainable reference which may contain ID, AGENCY ID and/or VERSION. /// </param> /// <param name="detail"> /// The <see cref="StructureQueryDetail"/> which controls if the output will include details or not. /// </param> /// <param name="versionConstraints"> /// A value indicating the version criteria. /// </param> /// <param name="allowedDataflows"> /// The allowed Dataflows. /// </param> /// <returns> /// The <see cref="ISet{IMaintainableMutableObject}"/>. /// </returns> public virtual ISet <T> Retrieve(IMaintainableRefObject maintainableRef, ComplexStructureQueryDetailEnumType detail, VersionQueryType versionConstraints, IList <IMaintainableRefObject> allowedDataflows) { return(this.Retrieve(maintainableRef, detail, versionConstraints)); }
/// <summary> /// Retrieve the <see cref="IMaintainableMutableObject"/> from Mapping Store. /// </summary> /// <param name="maintainableRef"> /// The maintainable reference which may contain ID, AGENCY ID and/or VERSION. /// </param> /// <param name="detail"> /// The <see cref="StructureQueryDetail"/> which controls if the output will include details or not. /// </param> /// <param name="versionConstraints">A value indicating the version criteria.</param> /// <returns> /// The <see cref="ISet{IMaintainableMutableObject}"/>. /// </returns> public abstract ISet <T> Retrieve(IMaintainableRefObject maintainableRef, ComplexStructureQueryDetailEnumType detail, VersionQueryType versionConstraints);
/// <summary> /// Retrieve the <see cref="IMaintainableMutableObject"/> from Mapping Store. /// </summary> /// <param name="maintainableRef"> /// The maintainable reference which may contain ID, AGENCY ID and/or VERSION. /// </param> /// <param name="detail"> /// The <see cref="StructureQueryDetail"/> which controls if the output will include details or not. /// </param> /// <param name="versionConstraints"> /// The version types. /// </param> /// <returns> /// The <see cref="ISet{IMaintainableMutableObject}"/>. /// </returns> public override ISet <TMaintaible> Retrieve(IMaintainableRefObject maintainableRef, ComplexStructureQueryDetailEnumType detail, VersionQueryType versionConstraints) { var sqlInfo = versionConstraints == VersionQueryType.Latest ? this.SqlQueryInfoForLatest : this.SqlQueryInfoForAll; var sqlQuery = new ArtefactSqlQuery(sqlInfo, maintainableRef); return(this.RetrieveItemScheme(detail, sqlQuery)); }