
This is the abstract class for a model provider class (MPC).
This is the abstract class for a model provider class (MPC). Every concrete implementation of a model provider class shall be derived from this class.
Several constants are defined for this class.
|
Constant |
Description |
|---|---|
|
GCS_SAP_TEXT_OBJECT_TYPES |
Constants can be use to address the kind of text which can be used, for example a text symbol of a class in the backend. The structure contains a list of the possible text object types. This text object should be used to create text with method SET_TEXT_KEY for a field label. TEXT_SYMBOL_CLASS uses a text element of a class in the backend system. |
|
CARDINALITY_FEED |
Value=* for multiplicity / cardinality of an association end type, for example. |
|
CARDINALITY_ENTITY |
Value=1 for multiplicity / cardinality of an association end type, for example. |
|
CARDINALITY_ENTITY_0 |
Value=0..1 for multiplicity / cardinality of an association end type, for example. |
|
GCS_SAP_SEMANTIC |
All possible values as constants for annotation sap:semantics. |
|
GCS_FC_TARGET_PATH |
Values for target path of feed customization, for example for content source and type of a Media Links entry. |
There is only one member, that is the MODEL which is the starting object to define the OData Channel data model.
Method DEFINE
This method needs to be implemented by an application to define its metadata. The entry point is the member data model.
Method GET_LAST_MODIFIED
Based on the implementation of this method a time stamp is sent in the HTTP response header of every metadata request to give the Web infrastructure the ability to cache the metadata document.
The default implementation of this method derives the last modified time stamp based on the changed time stamp of the model provider class (MPC). The application can overwrite the logic if it does not fit.
|
Parameter |
Description |
|---|---|
|
RV_LAST_MODIFIED |
Time stamp which is set as Last-Modified in the HTTP response header. |
Starting with SAP NetWeaver Gateway 2.0 SP06 (IW_BEP and IF_FND) the result of GET_LAST_MODIFIED also controls the cache on the SAP NetWeaver Gateway server for service document and service metadata document requests. If the SAP NetWeaver Gateway metadata cache is active, then the SAP NetWeaver Gateway server performs a handshake with the backend, based on the GET_LAST_MODIFIED result and compares the timestamp from the cached metadata on the SAP NetWeaver Gateway server with the one returned by the GET_LAST_MODIFIED implementation of the Model Provider on the backend.
If the cache is outdated on the SAP NetWeaver Gateway server, then the new metadata is sent from the backend and the cache is updated with the new metadata on the SAP NetWeaver Gateway server. As a result, the latest changes of your metadata is always reflected when requesting a service and a service metadata document.
As a result, the latest changes of your metadata is always reflected when requesting a service and a service metadata document.
With this behavior the following setup will lead to a performance bottleneck for service and service metadata document requests, because the cache is in this case refreshed in every request for metadata:
In order to always have the latest metadata present on your client applications, it is recommended to perform a request to the service metadata document as a very first call of your client application choreography (for example when starting the application) to the SAP NetWeaver Gateway server.