Example #1
0
 /// <summary>
 /// A function that helps to interpret OData V4 annotations. It knows about the syntax of the path value used by the following dynamic expressions: <ul> <li>"14.5.2 Expression edm:AnnotationPath"</li> <li>"14.5.11 Expression edm:NavigationPropertyPath"</li> <li>"14.5.12 Expression edm:Path"</li> <li>"14.5.13 Expression edm:PropertyPath"</li> </ul> It returns the information whether the given path ends with "$count" or with a multi-valued structural or navigation property. Term casts and annotations of navigation properties are ignored.
 ///
 /// Examples: <pre>
 /// &lt;template:if test="{facet>Target/$AnnotationPath@@sap.ui.model.odata.v4.AnnotationHelper.isMultiple}">
 /// </pre>
 /// </summary>
 /// <param name="sPath">The path value from the meta model, for example "ToSupplier/@com.sap.vocabularies.Communication.v1.Address" or "@com.sap.vocabularies.UI.v1.FieldGroup#Dimensions"</param>
 /// <param name="oDetails">The details object</param>
 /// <returns><code>true</code> if the given path ends with "$count" or with a multi-valued structural or navigation property, <code>false</code> otherwise. If <code>oDetails.$$valueAsPromise</code> is <code>true</code> a <code>Promise</code> may be returned resolving with the boolean value.</returns>
 public extern static Union <bool, es5.Promise <object> > isMultiple(string sPath, sap.ui.model.odata.v4.AnnotationHelper.Info oDetails);
Example #2
0
 /// <summary>
 /// Determines which type of value list exists for the given property.
 /// </summary>
 /// <param name="vRawValue">The raw value from the meta model; must be either a property or a path pointing to a property (relative to <code>oDetails.schemaChildName</code>)</param>
 /// <param name="oDetails">The details object</param>
 /// <returns>The type of the value list or a <code>Promise</code> resolving with the type of the value list or rejected if the property cannot be found in the metadata</returns>
 public extern static Union <sap.ui.model.odata.v4.ValueListType, es5.Promise <object> > getValueListType(object vRawValue, sap.ui.model.odata.v4.AnnotationHelper.Info oDetails);