getEntitySet

open fun getEntitySet(name: String): EntitySet

Lookup an entity set by name. Panic if the entity set does not exist.

Example checking if an entity set exists:
open fun checkEntitySetExistsExample(): kotlin.Unit
{
    val service = this.service;
    if (service.metadata.entitySets.has("Categories"))
    {
        Ignore.valueOf_any(service.getEntitySet("Categories"));
    }
    else
    {
        // The entity set Categories 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}.entitySets, for looking up entity sets that might not exist.

Return

The requested entity set.

Parameters

name

Name of the entity set to be returned.