function addOrUpdateHierarchy(oColumn) {
			var iLevel = oColumn.level,
				sName = oColumn.name;

			aHierarchyProperties = aHierarchyProperties
				|| oEntityType.getAllHierarchyPropertyNames();

			aHierarchyProperties.forEach(function (sHierarchyName) {
				var oHierarchy = that.oAnalyticalQueryResult
						.findDimensionByPropertyName(sHierarchyName).getHierarchy(),
					oHierarchyDetails = null,
					// each hierarchy has a node ID property, see post processing in
					// sap.ui.model.analytics.odata4analytics.EntityType.prototype._init
					sNodeIDName = oHierarchy.getNodeIDProperty().name,
					oProperty;

				if (sNodeIDName === sName) {
					oHierarchyDetails = getOrCreateHierarchyDetails(oHierarchy);
				} else {
					oProperty = oHierarchy.getNodeExternalKeyProperty();
					if (oProperty && oProperty.name === sName) {
						oHierarchyDetails = getOrCreateHierarchyDetails(oHierarchy);
						oHierarchyDetails.nodeExternalKeyName = sName;
					} else {
						oProperty = oEntityType.getTextPropertyOfProperty(sNodeIDName);
						if (oProperty && oProperty.name === sName) {
							oHierarchyDetails = getOrCreateHierarchyDetails(oHierarchy);
							oHierarchyDetails.nodeTextName = sName;
						}
					}
				}
				if (oHierarchyDetails && "level" in oColumn) {
					// add level restriction and check that aColumns is properly defined
					if (typeof iLevel === "number") {
						if ("level" in oHierarchyDetails && oHierarchyDetails.level !== iLevel) {
							throw new Error("Multiple different level filter for hierarchy '"
								+ sNodeIDName + "' defined");
						}
						oHierarchyDetails.level = iLevel;
						// the property which defines the level also defines the grouping
						oHierarchyDetails.grouped = !!oColumn.grouped;
					} else {
						throw new Error("The level of '" + sNodeIDName
							+ "' has to be an integer value");
					}
				}
			});
		}
function addOrUpdateHierarchy(oColumn) {
			var iLevel = oColumn.level,
				sName = oColumn.name;

			aHierarchyProperties = aHierarchyProperties
				|| oEntityType.getAllHierarchyPropertyNames();

			aHierarchyProperties.forEach(function (sHierarchyName) {
				var oHierarchy = that.oAnalyticalQueryResult
						.findDimensionByPropertyName(sHierarchyName).getHierarchy(),
					oHierarchyDetails = null,
					// each hierarchy has a node ID property, see post processing in
					// sap.ui.model.analytics.odata4analytics.EntityType.prototype._init
					sNodeIDName = oHierarchy.getNodeIDProperty().name,
					oProperty;

				if (sNodeIDName === sName) {
					oHierarchyDetails = getOrCreateHierarchyDetails(oHierarchy);
				} else {
					oProperty = oHierarchy.getNodeExternalKeyProperty();
					if (oProperty && oProperty.name === sName) {
						oHierarchyDetails = getOrCreateHierarchyDetails(oHierarchy);
						oHierarchyDetails.nodeExternalKeyName = sName;
					} else {
						oProperty = oEntityType.getTextPropertyOfProperty(sNodeIDName);
						if (oProperty && oProperty.name === sName) {
							oHierarchyDetails = getOrCreateHierarchyDetails(oHierarchy);
							oHierarchyDetails.nodeTextName = sName;
						}
					}
				}
				if (oHierarchyDetails && "level" in oColumn) {
					// add level restriction and check that aColumns is properly defined
					if (typeof iLevel === "number") {
						if ("level" in oHierarchyDetails && oHierarchyDetails.level !== iLevel) {
							throw new Error("Multiple different level filter for hierarchy '"
								+ sNodeIDName + "' defined");
						}
						oHierarchyDetails.level = iLevel;
						// the property which defines the level also defines the grouping
						oHierarchyDetails.grouped = !!oColumn.grouped;
					} else {
						throw new Error("The level of '" + sNodeIDName
							+ "' has to be an integer value");
					}
				}
			});
		}
function addOrUpdateHierarchy ( oColumn ) { var iLevel = oColumn . level , sName = oColumn . name ; aHierarchyProperties = aHierarchyProperties || oEntityType . getAllHierarchyPropertyNames ( ) ; aHierarchyProperties . forEach ( function ( sHierarchyName ) { var oHierarchy = that . oAnalyticalQueryResult . findDimensionByPropertyName ( sHierarchyName ) . getHierarchy ( ) , oHierarchyDetails = null , // each hierarchy has a node ID property, see post processing in // sap.ui.model.analytics.odata4analytics.EntityType.prototype._init sNodeIDName = oHierarchy . getNodeIDProperty ( ) . name , oProperty ; if ( sNodeIDName === sName ) { oHierarchyDetails = getOrCreateHierarchyDetails ( oHierarchy ) ; } else { oProperty = oHierarchy . getNodeExternalKeyProperty ( ) ; if ( oProperty && oProperty . name === sName ) { oHierarchyDetails = getOrCreateHierarchyDetails ( oHierarchy ) ; oHierarchyDetails . nodeExternalKeyName = sName ; } else { oProperty = oEntityType . getTextPropertyOfProperty ( sNodeIDName ) ; if ( oProperty && oProperty . name === sName ) { oHierarchyDetails = getOrCreateHierarchyDetails ( oHierarchy ) ; oHierarchyDetails . nodeTextName = sName ; } } } if ( oHierarchyDetails && "level" in oColumn ) { // add level restriction and check that aColumns is properly defined if ( typeof iLevel === "number" ) { if ( "level" in oHierarchyDetails && oHierarchyDetails . level !== iLevel ) { throw new Error ( "Multiple different level filter for hierarchy '" + sNodeIDName + "' defined" ) ; } oHierarchyDetails . level = iLevel ; // the property which defines the level also defines the grouping oHierarchyDetails . grouped = ! ! oColumn . grouped ; } else { throw new Error ( "The level of '" + sNodeIDName + "' has to be an integer value" ) ; } } } ) ; }
/*
If the given analytical column is related to a hierarchy, add or update the corresponding
entry in <code>that.mHierarchyDetailsByName</code>.
@param {object} The analytical info for an analytical column
/ * If the given analytical column is related to a hierarchy add or update the corresponding entry in <code > that . mHierarchyDetailsByName< / code > .
Adds a column to the hierarchy