public class DefaultModelEntityService extends java.lang.Object implements ModelEntityService
ModelEntityService| Constructor and Description |
|---|
DefaultModelEntityService() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addIntegrationKeyToODataEntry(EdmEntitySet entitySet,
ODataEntry oDataEntry)
Adds the alias value for an item's integrationKey to the oDataEntry
|
int |
count(ItemLookupRequest lookupRequest)
Counts how many items in the platform match the provided request conditions.
|
protected ItemModel |
createItem(StorageRequest request,
CreateItemStrategy createItemStrategy) |
ItemModel |
createOrUpdateItem(StorageRequest request,
CreateItemStrategy createItemStrategy)
create or update platform items based on an ODataEntry
|
protected java.util.List<CreateItemValidator> |
getCreateItemValidators() |
protected EntityModelPopulator |
getEntityModelPopulator() |
protected IntegrationKeyGenerator<EdmEntitySet,ODataEntry> |
getIntegrationKeyGenerator() |
protected ItemLookupStrategy |
getItemLookupStrategy() |
ODataEntry |
getODataEntry(ItemConversionRequest conversionRequest)
Converts an itemModel into a ODataEntry
|
ItemModel |
lookup(ItemLookupRequest lookupRequest)
gets an itemModel based on the given information.
|
ItemLookupResult<ItemModel> |
lookupItems(ItemLookupRequest lookupRequest)
Searches for item models matching the conditions in the specified request.
|
protected void |
populateItem(StorageRequest request,
ItemModel item) |
void |
setCreateItemValidators(java.util.List<CreateItemValidator> createItemValidators) |
void |
setEntityModelPopulator(EntityModelPopulator entityModelPopulator) |
void |
setIntegrationKeyGenerator(IntegrationKeyGenerator<EdmEntitySet,ODataEntry> integrationKeyGenerator) |
void |
setItemLookupStrategy(ItemLookupStrategy itemLookupStrategy) |
public ItemModel createOrUpdateItem(StorageRequest request, CreateItemStrategy createItemStrategy) throws EdmException
ModelEntityServicecreateOrUpdateItem in interface ModelEntityServicerequest - Parameter object that holds values for creating or updating an item.createItemStrategy - strategy used to create non-existing itemsEdmException - in case there is an OData related issuepublic ODataEntry getODataEntry(ItemConversionRequest conversionRequest) throws EdmException
ModelEntityServicegetODataEntry in interface ModelEntityServiceconversionRequest - Parameter object that holds values for getting an ODataEntryEdmException - in case there is an OData related issuepublic java.lang.String addIntegrationKeyToODataEntry(EdmEntitySet entitySet,
ODataEntry oDataEntry)
ModelEntityServiceaddIntegrationKeyToODataEntry in interface ModelEntityServiceentitySet - Edmx representation of the itemoDataEntry - request body represented as xml or jsonpublic ItemModel lookup(ItemLookupRequest lookupRequest) throws EdmException
ModelEntityServicelookup in interface ModelEntityServicelookupRequest - Parameter object that holds values for getting an itemModelEdmException - in case there is an OData related issuepublic ItemLookupResult<ItemModel> lookupItems(ItemLookupRequest lookupRequest) throws EdmException
ModelEntityServicelookupItems in interface ModelEntityServicelookupRequest - Parameter object that holds values for getting an itemModelEdmException - in case there is an OData related issuepublic int count(ItemLookupRequest lookupRequest) throws EdmException
ModelEntityServicecount in interface ModelEntityServicelookupRequest - 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.EdmException - in case there is an OData related issueprotected void populateItem(StorageRequest request, ItemModel item) throws EdmException
EdmExceptionprotected ItemModel createItem(StorageRequest request, CreateItemStrategy createItemStrategy) throws EdmException
EdmExceptionprotected ItemLookupStrategy getItemLookupStrategy()
public void setItemLookupStrategy(ItemLookupStrategy itemLookupStrategy)
protected EntityModelPopulator getEntityModelPopulator()
public void setEntityModelPopulator(EntityModelPopulator entityModelPopulator)
protected java.util.List<CreateItemValidator> getCreateItemValidators()
public void setCreateItemValidators(java.util.List<CreateItemValidator> createItemValidators)
protected IntegrationKeyGenerator<EdmEntitySet,ODataEntry> getIntegrationKeyGenerator()
public void setIntegrationKeyGenerator(IntegrationKeyGenerator<EdmEntitySet,ODataEntry> integrationKeyGenerator)
Copyright © 2018 SAP SE. All Rights Reserved.