Interface ModelEntityService
-
- All Known Implementing Classes:
DefaultModelEntityService
public interface ModelEntityServiceService to create or update platform items based on an ODataEntry
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.StringaddIntegrationKeyToODataEntry(org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry oDataEntry)Deprecated, for removal: This API element is subject to removal in a future version.since 1905.intcount(ItemLookupRequest lookupRequest)Counts how many items in the platform match the provided request conditions.ItemModelcreateOrUpdateItem(StorageRequest request, CreateItemStrategy createItemStrategy)Deprecated, for removal: This API element is subject to removal in a future version.use one of theContextItemModelServicemethods depending on whether the item creation is allowed or not.org.apache.olingo.odata2.api.ep.entry.ODataEntrygetODataEntry(ItemConversionRequest conversionRequest)Converts an itemModel into a ODataEntryItemModellookup(ItemLookupRequest lookupRequest)Deprecated, for removal: This API element is subject to removal in a future version.usefindUniqueItem(ItemSearchRequest)instead.ItemLookupResult<ItemModel>lookupItems(ItemLookupRequest lookupRequest)Deprecated, for removal: This API element is subject to removal in a future version.usefindItems(ItemSearchRequest)instead.
-
-
-
Method Detail
-
createOrUpdateItem
@Deprecated(since="1905.07-CEP", forRemoval=true) ItemModel createOrUpdateItem(StorageRequest request, CreateItemStrategy createItemStrategy) throws org.apache.olingo.odata2.api.edm.EdmExceptionDeprecated, for removal: This API element is subject to removal in a future version.use one of theContextItemModelServicemethods depending on whether the item creation is allowed or not. Passing item creation strategy is not needed anymore.create or update platform items based on an ODataEntry- Parameters:
request- Parameter object that holds values for creating or updating an item.createItemStrategy- strategy used to create non-existing items- Returns:
- the ItemModel that was created or updated
- Throws:
org.apache.olingo.odata2.api.edm.EdmException- in case there is an OData related issue
-
lookup
@Deprecated(since="1905.2002-CEP", forRemoval=true) ItemModel lookup(ItemLookupRequest lookupRequest) throws org.apache.olingo.odata2.api.edm.EdmExceptionDeprecated, for removal: This API element is subject to removal in a future version.usefindUniqueItem(ItemSearchRequest)instead.gets an itemModel based on the given information.- Parameters:
lookupRequest- Parameter object that holds values for getting an itemModel- Returns:
- the itemModel
- Throws:
org.apache.olingo.odata2.api.edm.EdmException- in case there is an OData related issue
-
lookupItems
@Deprecated(since="1905.2002-CEP", forRemoval=true) ItemLookupResult<ItemModel> lookupItems(ItemLookupRequest lookupRequest) throws org.apache.olingo.odata2.api.edm.EdmExceptionDeprecated, for removal: This API element is subject to removal in a future version.usefindItems(ItemSearchRequest)instead.Searches for item models matching the conditions in the specified request.- Parameters:
lookupRequest- Parameter object that holds values for getting an itemModel- Returns:
- result searching item models by the specified request
- Throws:
org.apache.olingo.odata2.api.edm.EdmException- in case there is an OData related issue
-
getODataEntry
org.apache.olingo.odata2.api.ep.entry.ODataEntry getODataEntry(ItemConversionRequest conversionRequest) throws org.apache.olingo.odata2.api.edm.EdmException
Converts an itemModel into a ODataEntry- Parameters:
conversionRequest- Parameter object that holds values for getting an ODataEntry- Returns:
- The ODataEntry representation
- Throws:
org.apache.olingo.odata2.api.edm.EdmException- in case there is an OData related issue
-
addIntegrationKeyToODataEntry
@Deprecated(since="1905", forRemoval=true) java.lang.String addIntegrationKeyToODataEntry(org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry oDataEntry)Deprecated, for removal: This API element is subject to removal in a future version.since 1905. Use anIntegrationKeyGeneratorto generate the key value and instead of accessing theIntegrationservicesConstants.INTEGRATION_KEY_PROPERTY_NAMEattribute from theODataEntryuseIntegrationItem.getIntegrationKey()- the integration item is present in the request and should be used instead of ODataEntry.Adds the alias value for an item's integrationKey to the oDataEntry- Parameters:
entitySet- Edmx representation of the itemoDataEntry- request body represented as xml or json- Returns:
- The calculated integration key.
-
count
int count(ItemLookupRequest lookupRequest) throws org.apache.olingo.odata2.api.edm.EdmException
Counts how many items in the platform match the provided request conditions.- Parameters:
lookupRequest- a request specifying an item type, at a minimum, and possibly other conditions. For example, the request may point to the objects nested in the request's base item type and referred by the navigation segments.- Returns:
- number of items in the platform matching the request conditions.
- Throws:
org.apache.olingo.odata2.api.edm.EdmException- in case there is an OData related issue
-
-