src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalVersionInfo.js
function (oODataModelInstance) {
			var iVersion;
			var sODataModelName;

			// check if the given object has metadata and a class name
			if (oODataModelInstance && oODataModelInstance.getMetadata) {
				sODataModelName = oODataModelInstance.getMetadata().getName();
			}

			switch (sODataModelName) {
				case "sap.ui.model.odata.ODataModel": iVersion = this.V1; break;
				case "sap.ui.model.odata.v2.ODataModel": iVersion = this.V2; break;
				default: iVersion = this.NONE;
						 Log.info("AnalyticalVersionInfo.getVersion(...) - The given object is no instance of ODataModel V1 or V2!");
						 break;
			}
			return iVersion;
		}
function (oODataModelInstance) {
			var iVersion;
			var sODataModelName;

			// check if the given object has metadata and a class name
			if (oODataModelInstance && oODataModelInstance.getMetadata) {
				sODataModelName = oODataModelInstance.getMetadata().getName();
			}

			switch (sODataModelName) {
				case "sap.ui.model.odata.ODataModel": iVersion = this.V1; break;
				case "sap.ui.model.odata.v2.ODataModel": iVersion = this.V2; break;
				default: iVersion = this.NONE;
						 Log.info("AnalyticalVersionInfo.getVersion(...) - The given object is no instance of ODataModel V1 or V2!");
						 break;
			}
			return iVersion;
		}
function ( oODataModelInstance ) { var iVersion ; var sODataModelName ; // check if the given object has metadata and a class name if ( oODataModelInstance && oODataModelInstance . getMetadata ) { sODataModelName = oODataModelInstance . getMetadata ( ) . getName ( ) ; } switch ( sODataModelName ) { case "sap.ui.model.odata.ODataModel" : iVersion = this . V1 ; break ; case "sap.ui.model.odata.v2.ODataModel" : iVersion = this . V2 ; break ; default : iVersion = this . NONE ; Log . info ( "AnalyticalVersionInfo.getVersion(...) - The given object is no instance of ODataModel V1 or V2!" ) ; break ; } return iVersion ; }
find out which model is used
find out which model is used