Interface ModelEntityService

  • All Known Implementing Classes:
    DefaultModelEntityService

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

      • createOrUpdateItem

        @Deprecated(since="1905.07-CEP",
                    forRemoval=true)
        ItemModel createOrUpdateItem​(StorageRequest request,
                                     CreateItemStrategy createItemStrategy)
                              throws org.apache.olingo.odata2.api.edm.EdmException
        Deprecated, for removal: This API element is subject to removal in a future version.
        use one of the ContextItemModelService methods 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.EdmException
        Deprecated, for removal: This API element is subject to removal in a future version.
        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.EdmException
        Deprecated, for removal: This API element is subject to removal in a future version.
        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 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