Class DefaultStorageRequestFactory

    • Constructor Detail

      • DefaultStorageRequestFactory

        public DefaultStorageRequestFactory()
    • Method Detail

      • create

        public StorageRequest create​(org.apache.olingo.odata2.api.processor.ODataContext oDataContext,
                                     java.lang.String responseContentType,
                                     org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet,
                                     org.apache.olingo.odata2.api.ep.entry.ODataEntry entry)
        Description copied from interface: StorageRequestFactory
        Get the StorageRequest for persistence processing
        Specified by:
        create in interface StorageRequestFactory
        Parameters:
        oDataContext - The ODataContext to be used.
        responseContentType - contentType to use.
        entitySet - EdmEntitySet to use.
        entry - ODataEntry to use.
        Returns:
        The StorageRequest used for persistence
      • isReplaceAttributes

        protected boolean isReplaceAttributes​(org.apache.olingo.odata2.api.processor.ODataContext oDataContext)
        Determines if the request is to replace the attributes provided in the payload
        Parameters:
        oDataContext - Context used in making the decision
        Returns:
        true, replace attributes, otherwise false
      • isItemCanBeCreated

        protected boolean isItemCanBeCreated​(org.apache.olingo.odata2.api.processor.ODataContext context)
        Determines whether the request insists on updating an existing item only or allows new item creation.
        Parameters:
        context - context used in making the decision
        Returns:
        true, if the item can be created when it does not exist in the system; false, when new item cannot be created and only an existing item should be updated.
      • convert

        protected IntegrationItem convert​(org.apache.olingo.odata2.api.processor.ODataContext context,
                                          org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet,
                                          org.apache.olingo.odata2.api.ep.entry.ODataEntry entry)
                                   throws org.apache.olingo.odata2.api.edm.EdmException
        Throws:
        org.apache.olingo.odata2.api.edm.EdmException