src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalBinding.js
function(sGroupId, iAutoExpandGroupsToLevel, iStartIndex, iLength) {
			var iLevel = that._getGroupIdLevel(sGroupId);
			if (iLevel == iAutoExpandGroupsToLevel) {
				var aContext = that._getLoadedContextsForGroup(sGroupId, iStartIndex, iLength);
				var iLastLoadedIndex = iStartIndex + aContext.length - 1;

				if (aContext.length >= iLength) {
					return oNO_MISSING_MEMBER;
				} else if (that.mFinalLength[sGroupId]) {
					if (aContext.length >= that.mLength[sGroupId]) {
						return { groupId_Missing: null, length_Missing: iLength - aContext.length }; // group completely loaded, but some members are still missing
					} else {
						return { groupId_Missing: sGroupId, startIndex_Missing: iLastLoadedIndex + 1, length_Missing: iLength - aContext.length }; // loading must start here
					}
				} else {
					return { groupId_Missing: sGroupId, startIndex_Missing: iLastLoadedIndex + 1, length_Missing: iLength - aContext.length }; // loading must start here
				}
			}
			// deepest expansion level not yet reached, so traverse groups in depth-first order
			var aContext2 = that._getLoadedContextsForGroup(sGroupId, iStartIndex, iLength);
			var iLength_Missing = iLength, iLastLoadedIndex2 = iStartIndex + aContext2.length - 1;
			for (var i = -1, oContext; (oContext = aContext2[++i]) !== undefined; ) {
				iLength_Missing--; // count the current context
				var oGroupExpansionFirstMember = calculateRequiredSubGroupExpansion(that._getGroupIdFromContext(oContext, iLevel + 1), iAutoExpandGroupsToLevel, 0, iLength_Missing);
				if (oGroupExpansionFirstMember.groupId_Missing == null) {
					if (oGroupExpansionFirstMember.length_Missing == 0) {
						return oGroupExpansionFirstMember; // finished - everything is loaded
					} else {
						iLength_Missing = oGroupExpansionFirstMember.length_Missing;
					}
				} else {
					return oGroupExpansionFirstMember; // loading must start here
				}
				if (iLength_Missing == 0) {
					break;
				}
			}

			if (that.mFinalLength[sGroupId] || iLength_Missing == 0) {
				return { groupId_Missing: null, length_Missing: iLength_Missing }; // group completely loaded; maybe some members are still missing
			} else {
				return { groupId_Missing: sGroupId, startIndex_Missing: iLastLoadedIndex2 + 1, length_Missing: iLength_Missing }; // loading must start here
			}
		}
function(sGroupId, iAutoExpandGroupsToLevel, iStartIndex, iLength) {
			var iLevel = that._getGroupIdLevel(sGroupId);
			if (iLevel == iAutoExpandGroupsToLevel) {
				var aContext = that._getLoadedContextsForGroup(sGroupId, iStartIndex, iLength);
				var iLastLoadedIndex = iStartIndex + aContext.length - 1;

				if (aContext.length >= iLength) {
					return oNO_MISSING_MEMBER;
				} else if (that.mFinalLength[sGroupId]) {
					if (aContext.length >= that.mLength[sGroupId]) {
						return { groupId_Missing: null, length_Missing: iLength - aContext.length }; // group completely loaded, but some members are still missing
					} else {
						return { groupId_Missing: sGroupId, startIndex_Missing: iLastLoadedIndex + 1, length_Missing: iLength - aContext.length }; // loading must start here
					}
				} else {
					return { groupId_Missing: sGroupId, startIndex_Missing: iLastLoadedIndex + 1, length_Missing: iLength - aContext.length }; // loading must start here
				}
			}
			// deepest expansion level not yet reached, so traverse groups in depth-first order
			var aContext2 = that._getLoadedContextsForGroup(sGroupId, iStartIndex, iLength);
			var iLength_Missing = iLength, iLastLoadedIndex2 = iStartIndex + aContext2.length - 1;
			for (var i = -1, oContext; (oContext = aContext2[++i]) !== undefined; ) {
				iLength_Missing--; // count the current context
				var oGroupExpansionFirstMember = calculateRequiredSubGroupExpansion(that._getGroupIdFromContext(oContext, iLevel + 1), iAutoExpandGroupsToLevel, 0, iLength_Missing);
				if (oGroupExpansionFirstMember.groupId_Missing == null) {
					if (oGroupExpansionFirstMember.length_Missing == 0) {
						return oGroupExpansionFirstMember; // finished - everything is loaded
					} else {
						iLength_Missing = oGroupExpansionFirstMember.length_Missing;
					}
				} else {
					return oGroupExpansionFirstMember; // loading must start here
				}
				if (iLength_Missing == 0) {
					break;
				}
			}

			if (that.mFinalLength[sGroupId] || iLength_Missing == 0) {
				return { groupId_Missing: null, length_Missing: iLength_Missing }; // group completely loaded; maybe some members are still missing
			} else {
				return { groupId_Missing: sGroupId, startIndex_Missing: iLastLoadedIndex2 + 1, length_Missing: iLength_Missing }; // loading must start here
			}
		}
function ( sGroupId , iAutoExpandGroupsToLevel , iStartIndex , iLength ) { var iLevel = that . _getGroupIdLevel ( sGroupId ) ; if ( iLevel == iAutoExpandGroupsToLevel ) { var aContext = that . _getLoadedContextsForGroup ( sGroupId , iStartIndex , iLength ) ; var iLastLoadedIndex = iStartIndex + aContext . length - 1 ; if ( aContext . length >= iLength ) { return oNO_MISSING_MEMBER ; } else if ( that . mFinalLength [ sGroupId ] ) { if ( aContext . length >= that . mLength [ sGroupId ] ) { return { groupId_Missing : null , length_Missing : iLength - aContext . length } ; // group completely loaded, but some members are still missing } else { return { groupId_Missing : sGroupId , startIndex_Missing : iLastLoadedIndex + 1 , length_Missing : iLength - aContext . length } ; // loading must start here } } else { return { groupId_Missing : sGroupId , startIndex_Missing : iLastLoadedIndex + 1 , length_Missing : iLength - aContext . length } ; // loading must start here } } // deepest expansion level not yet reached, so traverse groups in depth-first order var aContext2 = that . _getLoadedContextsForGroup ( sGroupId , iStartIndex , iLength ) ; var iLength_Missing = iLength , iLastLoadedIndex2 = iStartIndex + aContext2 . length - 1 ; for ( var i = - 1 , oContext ; ( oContext = aContext2 [ ++ i ] ) !== undefined ; ) { iLength_Missing -- ; // count the current context var oGroupExpansionFirstMember = calculateRequiredSubGroupExpansion ( that . _getGroupIdFromContext ( oContext , iLevel + 1 ) , iAutoExpandGroupsToLevel , 0 , iLength_Missing ) ; if ( oGroupExpansionFirstMember . groupId_Missing == null ) { if ( oGroupExpansionFirstMember . length_Missing == 0 ) { return oGroupExpansionFirstMember ; // finished - everything is loaded } else { iLength_Missing = oGroupExpansionFirstMember . length_Missing ; } } else { return oGroupExpansionFirstMember ; // loading must start here } if ( iLength_Missing == 0 ) { break ; } } if ( that . mFinalLength [ sGroupId ] || iLength_Missing == 0 ) { return { groupId_Missing : null , length_Missing : iLength_Missing } ; // group completely loaded; maybe some members are still missing } else { return { groupId_Missing : sGroupId , startIndex_Missing : iLastLoadedIndex2 + 1 , length_Missing : iLength_Missing } ; // loading must start here } }
helper function
Searches for missing members in the sub groups of the given sGroupId
@returns {Object} Either { groupId_Missing, startIndex_Missing, length_Missing }
expressing the number (length_Missing) of missing contexts starting in group (groupId_Missing)
at position (startIndex_Missing) using depth-first traversal of loaded data,
or { null, length_Missing } if the group with given ID (sGroupId) is completely loaded
and still (length_Missing) further members (of other groups) are missing.
Special case: { null, 0 } denotes that everything is loaded.
helper function Searches for missing members in the sub groups of the given sGroupId