Interface ModelEntityService

  • All Known Implementing Classes:
    DefaultModelEntityService

    public interface ModelEntityService
    Service to create or update platform items based on an ODataEntry
    • Method Detail

      • createOrUpdateItem

        ItemModel createOrUpdateItem​(StorageRequest request,
                                     CreateItemStrategy createItemStrategy)
                              throws org.apache.olingo.odata2.api.edm.EdmException
        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

        ItemModel lookup​(ItemLookupRequest lookupRequest)
                  throws org.apache.olingo.odata2.api.edm.EdmException
        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

        ItemLookupResult<ItemModel> lookupItems​(ItemLookupRequest lookupRequest)
                                         throws org.apache.olingo.odata2.api.edm.EdmException
        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
        java.lang.String addIntegrationKeyToODataEntry​(org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet,
                                                       org.apache.olingo.odata2.api.ep.entry.ODataEntry oDataEntry)
        Deprecated.
        since 1905. Use an IntegrationKeyGenerator to generate the key value and instead of accessing the IntegrationservicesConstants.INTEGRATION_KEY_PROPERTY_NAME attribute from the ODataEntry use IntegrationItem.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 item
        oDataEntry - 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