Class StorageRequest

    • Method Detail

      • getPrePersistHook

        public java.lang.String getPrePersistHook()
      • getPostPersistHook

        public java.lang.String getPostPersistHook()
      • setPostPersistHook

        protected void setPostPersistHook​(java.lang.String postPersistHook)
      • setPrePersistHook

        protected void setPrePersistHook​(java.lang.String prePersistHook)
      • toLookupRequest

        public ItemLookupRequest toLookupRequest()
                                          throws org.apache.olingo.odata2.api.edm.EdmException
        Creates an ItemLookupRequest from this StorageRequest
        Returns:
        the newly constructed ItemLookupRequest
        Throws:
        org.apache.olingo.odata2.api.edm.EdmException - if encounters an OData problem
      • getContentLocale

        public java.util.Locale getContentLocale()
        Description copied from interface: PersistenceContext
        Indicates the language, in which localized attributes content is provided.
        Specified by:
        getContentLocale in interface PersistenceContext
        Returns:
        Locale or null
      • setContentLocale

        protected void setContentLocale​(java.util.Locale contentLocale)
      • getContextItem

        public java.util.Optional<ItemModel> getContextItem()
                                                     throws org.apache.olingo.odata2.api.edm.EdmException
        Throws:
        org.apache.olingo.odata2.api.edm.EdmException
      • putItem

        public void putItem​(ItemModel item)
                     throws org.apache.olingo.odata2.api.edm.EdmException
        Throws:
        org.apache.olingo.odata2.api.edm.EdmException
      • isReplaceAttributes

        public boolean isReplaceAttributes()
        Description copied from interface: PersistenceContext
        Indicates the persistence is to replace the item attributes with what's provided in the IntegrationItem. This is primarily applicable to collections. The default behavior is to append to the collection. With this method being true, the item's collection attribute will be replaced instead of appended.
        Specified by:
        isReplaceAttributes in interface PersistenceContext
        Returns:
        true means to replace attributes, otherwise false.
      • isItemCanBeCreated

        public boolean isItemCanBeCreated()
        Description copied from interface: PersistenceContext
        Determines whether a new item model can be created for the context payload.
        Specified by:
        isItemCanBeCreated in interface PersistenceContext
        Returns:
        true, when new item can be create, if an item matching the context was not found in the persistent storage; false, if the context implies update only and therefore the item should not be created, if it does not exist yet.
      • getSourceContext

        public java.util.Optional<PersistenceContext> getSourceContext()
        Description copied from interface: PersistenceContext
        Retrieves the persistence context that the referenced context was gotten from
        Specified by:
        getSourceContext in interface PersistenceContext
        Returns:
        the source context. If the context is already the source, Optional.empty is returned