ENTITY- the entity type
@FunctionalInterface public interface Persister<ENTITY> extends UnaryOperator<ENTITY>, Consumer<ENTITY>
Consumer-interfaces so that it can be used inside a
|Modifier and Type||Method and Description|
Persists the entity in the data store.
Persists the provided entity to the underlying database and returns a potentially updated entity.
ENTITY apply(ENTITY entity) throws SpeedmentException
It is unspecified if the returned updated entity is the same provided entity instance or another entity instance. It is erroneous to assume either, so you should use only the returned entity after the method has been called. However, it is guaranteed that the provided entity is untouched if an exception is thrown.
The fields of returned entity instance may differ from the provided entity fields due to auto generated column(s) or because of any other modification that the underlying database imposed on the persisted entity.
default void accept(ENTITY entity)
Copyright © 2019 Speedment, Inc.. All rights reserved.