public class SamplePrePersistHook extends ExternalResource implements PrePersistHook
| Constructor and Description |
|---|
SamplePrePersistHook() |
| Modifier and Type | Method and Description |
|---|---|
void |
after() |
java.util.Optional<ItemModel> |
execute(ItemModel item)
Executes this hook before persisting the given item.
|
void |
givenDoesInExecute(java.util.function.Function<ItemModel,java.util.Optional<ItemModel>> function) |
boolean |
isExecuted() |
void |
setHookRegistry(DefaultPersistenceHookRegistry registry) |
public java.util.Optional<ItemModel> execute(ItemModel item)
PrePersistHookexecute in interface PrePersistHookitem - an item to execute this hook with.public boolean isExecuted()
public void givenDoesInExecute(java.util.function.Function<ItemModel,java.util.Optional<ItemModel>> function)
public void after()
public void setHookRegistry(DefaultPersistenceHookRegistry registry)
Copyright © 2018 SAP SE. All Rights Reserved.