/// <summary>
        /// Gets column value for analysis processing result column
        /// </summary>
        /// <param name="processingResultColumn">Processing result column</param>
        /// <param name="yCategory">Y category</param>
        /// <returns>Returns result column value</returns>
        public static AnalysisProcessingResultColumnValue ColumnValueForAPResultColumnYCategory(AnalysisProcessingResultColumn processingResultColumn, AnalysisProcessingYCategoryValue yCategory)
        {
            AnalysisResultColumn resultColumn = processingResultColumn.ResultColumn;

            if (resultColumn is AnalysisSourceFieldResultColumn)
            {
                return(new AnalysisProcessingSimpleResultColumnValue((AnalysisSourceFieldResultColumn)resultColumn, yCategory, processingResultColumn));
            }

            if (resultColumn is AnalysisTableResultColumn)
            {
                return(new AnalysisProcessingTableResultColumnValue((AnalysisTableResultColumn)resultColumn, yCategory, processingResultColumn));
            }

            if (resultColumn is AnalysisValueResultColumn)
            {
                return(new AnalysisProcessingValueResultColumnValue((AnalysisValueResultColumn)resultColumn, yCategory, processingResultColumn));
            }

            return(null);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="AnalysisProcessingResultColumnValue"/> class.
 /// </summary>
 /// <param name="processingResultColumn">Processing result column</param>
 /// <param name="yCategory">Y category</param>
 public AnalysisProcessingResultColumnValue(AnalysisProcessingResultColumn processingResultColumn, AnalysisProcessingYCategoryValue yCategory)
 {
     this.ProcessingResultColumn = processingResultColumn;
     this.YCategoryValue         = yCategory;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AnalysisProcessingSimpleResultColumnValue"/> class.
 /// </summary>
 /// <param name="resultColumn">Result column</param>
 /// <param name="yCategory">Y category</param>
 /// <param name="processingResultColumn">Processing result column</param>
 public AnalysisProcessingSimpleResultColumnValue(AnalysisSourceFieldResultColumn resultColumn, AnalysisProcessingYCategoryValue yCategory, AnalysisProcessingResultColumn processingResultColumn)
     : base(processingResultColumn, yCategory)
 {
     this.ResultColumn    = resultColumn;
     this.SourceField     = resultColumn.AnalysisField;
     this.WeightField     = resultColumn.WeightField;
     this.CurrencyField   = resultColumn.CurrencyField;
     this.aggregatedValue = 0;
     this.AggregationType = resultColumn.AggregationType;
     this.appliedRecordIdentifications = new Dictionary <string, object>();
     this.queryTableIndex = resultColumn.AnalysisField.AnalysisTable.QueryTableIndex;
     this.count           = 0;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="AnalysisProcessingValueResultColumnValue"/> class.
        /// </summary>
        /// <param name="resultColumn">Result column</param>
        /// <param name="yCategoryValue">Y category value</param>
        /// <param name="processingResultColumn">Processing result column</param>
        public AnalysisProcessingValueResultColumnValue(AnalysisValueResultColumn resultColumn, AnalysisProcessingYCategoryValue yCategoryValue, AnalysisProcessingResultColumn processingResultColumn)
            : base(processingResultColumn, yCategoryValue)
        {
            this.ResultColumn    = resultColumn;
            this.ValueFunction   = this.ResultColumn.ValueFunction;
            this.AggregationType = this.ResultColumn.AggregationType;
            if (this.ResultColumn.IsStatic)
            {
                this.valueAggregator = new AnalysisProcessingStaticValueAggregator();
            }
            else if (this.ResultColumn.ValueOptions.IsText)
            {
                this.valueAggregator = new AnalysisProcessingStringValueAggregator(this.ResultColumn.ValueOptions);
            }
            else if (this.AggregationType != null)
            {
                this.valueAggregator = this.AggregationType.CreateValueAggregator();
            }
            else
            {
                this.valueAggregator = new AnalysisProcessingSumValueAggregator();
            }

            this.SignificantQueryResultTableIndices = this.ResultColumn.SignificantQueryResultTableIndices;
            if (this.SignificantQueryResultTableIndices.Count == 0)
            {
                this.SignificantQueryResultTableIndices = new List <object> {
                    0
                };
            }

            this.complete = true;
        }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AnalysisProcessingTableResultColumnValue"/> class.
 /// </summary>
 /// <param name="resultColumn">Result column</param>
 /// <param name="yCategory">Y category</param>
 /// <param name="processingResultColumn">Processing result column</param>
 public AnalysisProcessingTableResultColumnValue(AnalysisTableResultColumn resultColumn, AnalysisProcessingYCategoryValue yCategory, AnalysisProcessingResultColumn processingResultColumn)
     : base(processingResultColumn, yCategory)
 {
     this.ResultColumn    = resultColumn;
     this.count           = 0;
     this.queryTableIndex = this.ResultColumn.AnalysisTable.QueryTableIndex;
 }