get Data Method
Lookup a data method by qualified name (for function/action definitions) or by unqualified name (for function/action imports). Panic if the data method does not exist.
- Example checking if a data method exists:
open fun checkDataMethodExistsExample(): kotlin.Unit { val service = this.service; val csdlDocument = service.metadata; if (csdlDocument.dataMethods.has("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person.UpdatePersonLastName")) { Ignore.valueOf_any(service.getDataMethod("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person.UpdatePersonLastName")); } else { // The data method UpdatePersonLastName does not exists, add logic to handle the issue/throw an Exception, etc.. } }
- See Also:
-
{@link com.sap.cloud.mobile.kotlin.odata.DataServiceAsync#metadata DataServiceAsync.metadata}.
dataMethods, for looking up data methods that might not exist.
Return
The requested data method.
Parameters
name
Name of the data method to be returned.