This is the interface for an entity type for OData version 4 (V4).
You can use the methods of this interface to maintain an entity type during creation of a service model in a model provider class.
To access entity type information at runtime refer to interface /IWBEP/IF_V4_MED_ENTITY_TYPE_R.
This interface includes interface /iwbep/if_v4_med_element.
Visibility and Level |
Alias |
Component |
---|---|---|
public |
get_edm_name | //IWBEP/IF_V4_MED_ELEMENT~GET_EDM_NAME |
public |
get_internal_name |
/IWBEP/IF_V4_MED_ELEMENT~GET_INTERNAL_NAME |
This method creates a complex property.
This method appends a complex property with internal name IV_PROPERTY_NAME to the list of properties of the entity type. You can specify certain attributes of this complex property, its type for example, through interface /IWBEP/IF_V4_MED_CPLX_PROP at the instance provided in RO_PROPERTY.
IMPORTING iv_property_name TYPE /iwbep/if_v4_med_element=>ty_e_med_internal_name RETURNING VALUE(ro_property) TYPE REF TO /iwbep/if_v4_med_cplx_prop RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
iv_property_name |
Internal property name. |
ro_property |
Complex property. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
The system will raise an exception if IV_PROPERTY_NAME does not comply with ABAP naming conventions or if an entity set with the given internal name exists already.
This method creates an entity set for an entity type.
The system will create an entity set with internal name IV_ENTITY_SET_NAME that references the entity type.
IMPORTING iv_entity_set_name TYPE /iwbep/if_v4_med_element=>ty_e_med_internal_name RETURNING VALUE(ro_entity_set) TYPE REF TO /iwbep/if_v4_med_entity_set RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
iv_entity_set_name |
Internal entity set name. |
ro_entity_set |
Entity set object. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
The system will raise an exception if IV_ENTITY_SET_NAME does not comply with ABAP naming conventions or if an entity set with the given internal name exists already.
This method creates a navigation property with the name IV_PROPERTY_NAME.
IMPORTING iv_property_name TYPE /iwbep/if_v4_med_element=>ty_e_med_internal_name RETURNING VALUE(ro_property) TYPE REF TO /iwbep/if_v4_med_nav_prop RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
iv_property_name |
Internal navigation property name. |
ro_property |
Navigation property. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
Throw an exception if the navigation with the name IV_PROPERTY_NAME is already defined.
This method creates a primitive property. This method adds a primitive property to the entity type with the name IV_PROPERTY_NAME.
IMPORTING iv_property_name TYPE /iwbep/if_v4_med_element=>ty_e_med_internal_name RETURNING VALUE(ro_property) TYPE REF TO /iwbep/if_v4_med_prim_prop RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
iv_property_name |
Internal property name. |
ro_property |
Property. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
Throw an exception if the navigation with the name IV_PROPERTY_NAME is already defined.
This method creates a primitive property using ABAP Dictionary information.
This method adds a primitive property to the entity type with the name IV_PROPERTY_NAME. The property information is received from the ABAP Dictionary element IV_ELEMENT_NAME.
IMPORTING iv_property_name TYPE /iwbep/if_v4_med_element=>ty_e_med_internal_name iv_element_name TYPE string RETURNING VALUE(ro_property) TYPE REF TO /iwbep/if_v4_med_prim_prop RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
iv_property_name |
Internal property name. |
iv_element_name |
ABAP Dictionary element name. |
ro_property |
Property. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
Throw an exception if the property with the name IV_PROPERTY_NAME is already defined.
This method gets complex properties.
The system returns a list of complex properties of the entity type. The list may be empty.
EXPORTING et_property TYPE /iwbep/if_v4_med_element=>ty_t_med_cplx_property RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
et_property |
Complex properties of entity type. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
This method gets a complex property.
The system returns a complex property of the entity type.
IMPORTING iv_property_name TYPE /iwbep/if_v4_med_element=>ty_e_med_internal_name RETURNING VALUE(ro_property) TYPE REF TO /iwbep/if_v4_med_cplx_prop RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
iv_property_name |
Internal property name. |
ro_property |
Complex property. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
If no property was found an exception is raised.
This method gets an ETag property.
The system returns an ETag property of the entity type.
RETURNING VALUE(ro_property) TYPE REF TO /iwbep/if_v4_med_prim_prop RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
ro_property |
Primitive ETag property. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
An exception is raised if the property could not be found.
This method gets key properties.
The system returns the key properties of the entity type.
EXPORTING et_property TYPE /iwbep/if_v4_med_element=>ty_t_med_prim_property RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
et_property |
Key properties. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
This method gets key property names.
The system returns the names of the key properties in ET_INTERNAL_NAME.
EXPORTING et_interal_name TYPE /iwbep/if_v4_med_element=>ty_t_med_internal_name RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
et_interal_name |
Internal names of key properties. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
This method gets navigation properties.
The system returns the navigation properties in ET_PROPERTY.
EXPORTING et_property TYPE /iwbep/if_v4_med_element=>ty_t_med_nav_property RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
et_property |
Navigation properties. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
This method gets the navigation property.
The system return the navigation property with the name IV_PROPERTY_NAME.
IMPORTING iv_property_name TYPE /iwbep/if_v4_med_element=>ty_e_med_internal_name RETURNING VALUE(ro_property) TYPE REF TO /iwbep/if_v4_med_nav_prop RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
iv_property_name |
Internal property name. |
ro_property |
Navigation property. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
An exception is raised if no navigation property could be found.
This method gets primitive properties.
The system returns the primitive properties in ET_PROPERTY.
EXPORTING et_property TYPE /iwbep/if_v4_med_element=>ty_t_med_prim_property RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
et_property |
Primitive properties. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
This method gets the primitive property.
The system returns the primitive property with the internal name specified in IV_PROPERTY_NAME.
IMPORTING iv_property_name TYPE /iwbep/if_v4_med_element=>ty_e_med_internal_name RETURNING VALUE(ro_property) TYPE REF TO /iwbep/if_v4_med_prim_prop RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
iv_property_name |
Internal property name. |
ro_property |
Primitive property. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
The system will raise an exception if no primitive property with the given internal name exists at the entity type.
This method gets properties.
The system returns the properties of the entity type.
EXPORTING et_property TYPE /iwbep/if_v4_med_element=>ty_t_med_property RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
et_property |
Properties. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
This method gets the property by the internal name.
The system returns the property of the entity type.
IMPORTING iv_property_name TYPE /iwbep/if_v4_med_element=>ty_e_med_internal_name RETURNING VALUE(ro_property) TYPE REF TO /iwbep/if_v4_med_element RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
iv_property_name |
Internal property name. |
ro_property |
Property element. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
The system will raise an exception if no property with the given internal name exists at the entity type.
This method gets the name of the assigned structure.
The value could be empty.
RETURNING VALUE(rv_struct_name) TYPE string RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
rv_struct_name |
Structure name. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
This method checks if a structure assignment exists.
RETURNING VALUE(rv_has_struct_assign) TYPE abap_bool RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
rv_has_struct_assign |
Structure name. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
This method sets an EDM/OData name.
RETURNING IMPORTING iv_edm_name TYPE /iwbep/if_v4_med_element=>ty_e_med_edm_name RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
iv_edm_name |
EDM name. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
The system will raise an exception if the EDM name for an entity type is already in use. Or if the EDM name is invalid.