Skip to content

Class: ODataProviderProxy

A designer-facing interface that provides access to a odata provider.

Hierarchy

Implements

Summary

Constructors

Properties

Class Properties

Inherited Properties

Currently none inherited from the parent class(es).

Methods

Class Methods

Inherited Methods

Currently none inherited from the parent class(es).

Constructors

constructor

+ new ODataProviderProxy(serviceName: string): ODataProviderProxy

Parameters:

Name Type
serviceName string

Returns: ODataProviderProxy

Properties

Protected _serviceName

_serviceName: string

Methods

getMetadata

getMetadata(): CsdlDocumentProxy

Implementation of IODataProviderProxy

Returns the proxy of the $metadata associated with the data provider if available. Otherwise, it will be null. Any $metadata changes happening on the backend server after initializing the data service for the first time will not be reflected unless the users restart the application or call the refreshMetadata API.

Returns: CsdlDocumentProxy


isDraftEnabled

isDraftEnabled(entitySet: string): boolean

Implementation of IODataProviderProxy

Determine whether the entitySet is draft enabled

Parameters:

Name Type
entitySet string

Returns: boolean


isInitialized

isInitialized(): boolean

Implementation of IODataProviderProxy

Determine whether the data provider is initialized

Returns: boolean


isOfflineEnabled

isOfflineEnabled(): boolean

Implementation of IODataProviderProxy

Determine whether the data provider is offline enabled

Returns: boolean


refreshMetadata

refreshMetadata(): Promise‹boolean›

Implementation of IODataProviderProxy

Reloads the latest $metadata from the backend server. It checks the compatibility between the current $metadata and the $metadata from the backend server, then updates the $metadata associated with the data provider if there is no conflict.

Returns: Promise‹boolean›

a promise with a boolean result indicating whether the $metadata was updated successfully.