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
Returns the version of the given object