Implementation to access OData metadata
Constructor for a new ODataMetadata.
new sap.ui.model.odata.ODataMetadata(sMetadataURI, mParams?)
Param | Type | Default Value | Description |
---|---|---|---|
sMetadataURI | string | needs the correct metadata uri including $metadata |
|
mParams? | object | optional map of parameters. |
|
async? | boolean | true | request is per default async |
user? | string | Deprecated for security reasons. Use strong server side authentication instead. UserID for the service. |
|
password? | string | Deprecated for security reasons. Use strong server side authentication instead. Password for the service. |
|
headers? | object | (optional) map of custom headers which should be set with the request. |
|
cacheKey? | string | (optional) A valid cache key |
Method | Description |
---|---|
attachFailed |
Attaches event handler When called, the context of the event handler (its |
attachLoaded |
Attaches event handler When called, the context of the event handler (its |
detachFailed |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachLoaded |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.model.odata.ODataMetadata.extend |
Creates a new subclass of class sap.ui.model.odata.ODataMetadata with name
|
fireFailed |
Fires event failed to attached listeners. |
fireLoaded |
Fires event loaded to attached listeners. |
sap.ui.model.odata.ODataMetadata.getMetadata |
Returns a metadata object for class sap.ui.model.odata.ODataMetadata. |
getServiceMetadata |
Return the metadata object. |
getUseBatch |
Get the use-batch extension value if any |
isFailed |
Checks whether metadata loading has already failed. |
isLoaded |
Checks whether metadata is available. |
loaded |
Returns a promise for the loaded state of the metadata. |
refresh |
Refreshes the metadata creating a new request to the server. Returns a new promise which can be resolved or rejected depending on the metadata loading state. |
Attaches event handler fnFunction
to the failed event of this sap.ui.model.odata.ODataMetadata
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.model.odata.ODataMetadata
itself.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function |
The function to be called, when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the loaded event of this sap.ui.model.odata.ODataMetadata
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.model.odata.ODataMetadata
itself.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function |
The function to be called, when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Detaches event handler fnFunction
from the failed event of this sap.ui.model.odata.ODataMetadata
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the loaded event of this sap.ui.model.odata.ODataMetadata
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Creates a new subclass of class sap.ui.model.odata.ODataMetadata with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.base.EventProvider.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Fires event failed to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
oParameters | object |
Parameters to pass along with the event |
|
message | string |
A text that describes the failure. |
|
statusCode | string |
HTTP status code returned by the request (if available) |
|
statusText | string |
The status as a text, details not specified, intended only for diagnosis output |
|
responseText | string |
Response that has been received for the request, as a text string |
Fires event loaded to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
oParameters | object |
Parameters to pass along with the event |
Returns a metadata object for class sap.ui.model.odata.ODataMetadata.
Returns a promise for the loaded state of the metadata.
Param | Type | DefaultValue | Description |
---|---|---|---|
bRejectOnFailure | boolean | false |
With |