java.lang.Object
de.hybris.platform.odata2services.odata.persistence.hook.impl.PrePersistHookAdapter
All Implemented Interfaces:
PrePersistHook

@Deprecated(since="2205", forRemoval=true) public class PrePersistHookAdapter extends Object implements PrePersistHook
Deprecated, for removal: This API element is subject to removal in a future version.
used temporary while old hooks are beeing reworked to use the new PrePersistHook interface
Adapter class to use old pre persist hooks in the new persistence service
  • Constructor Details

    • PrePersistHookAdapter

      public PrePersistHookAdapter(@NotNull @NotNull PrePersistHook hook)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Instantiates this adapter
      Parameters:
      hook - a legacy hook implementation to adapt to the new hook interface
  • Method Details

    • execute

      public Optional<ItemModel> execute(ItemModel item, PersistenceContext context)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PrePersistHook
      Executes this hook before persisting the given item.
      Specified by:
      execute in interface PrePersistHook
      Parameters:
      item - an item to execute this hook with.
      context - to provide information about the item to be persisted
      Returns:
      result of processing/modification of the item by this hook to be persisted. If empty, that means there is no item to persist.
      See Also: