ENTITY
- the entity type@FunctionalInterface public interface Remover<ENTITY> extends UnaryOperator<ENTITY>, Consumer<ENTITY>
UnaryOperator
- and
Consumer
-interfaces so that it can be used inside a Stream
.Modifier and Type | Method and Description |
---|---|
default void |
accept(ENTITY entity)
Removes the entity from the data store.
|
ENTITY |
apply(ENTITY entity)
Removes the provided entity from the underlying database and returns the
provided entity instance.
|
identity
ENTITY apply(ENTITY entity) throws SpeedmentException
SpeedmentException
is thrown.
Entities are uniquely identified by their primary key(s).
apply
in interface Function<ENTITY,ENTITY>
entity
- to removeSpeedmentException
- if the underlying database throws an exception
(e.g. SQLException)default void accept(ENTITY entity)
accept
in interface Consumer<ENTITY>
entity
- the entity to removeSpeedmentException
- if removing the entity failedCopyright © 2019 Speedment, Inc.. All rights reserved.