public class OrderCompletionReport extends Object implements org.springframework.data.util.Streamable<OrderCompletionReport.OrderLineCompletion>
Modifier and Type | Class and Description |
---|---|
static class |
OrderCompletionReport.CompletionStatus
The status of a completion.
|
static class |
OrderCompletionReport.OrderLineCompletion
The completion status of an
OrderLine . |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
and, and, and, and, empty, filter, flatMap, get, isEmpty, map, of, of, of, stream, toList, toSet
forEach, spliterator
public static OrderCompletionReport success(Order order)
OrderCompletionReport
representing a successful verification of the given Order
.order
- must not be null.public static OrderCompletionReport failed(Order order)
OrderCompletionReport
for an Order
that's marked as failed.order
- must not be null.public static OrderCompletionReport forCompletions(Order order, Iterable<OrderCompletionReport.OrderLineCompletion> completions)
OrderCompletionReport
for the given Order
and OrderCompletionReport.OrderLineCompletion
s.order
- must not be null.completions
- must not be null.public boolean hasErrors()
OrderCompletionReport.OrderLineCompletion
(e.g. using Streamable.stream()
to access the individual completions).public void onError(Function<OrderCompletionReport,? extends RuntimeException> exception)
Function
to produce an exception in case the report has errors.exception
- must not be null.public Iterator<OrderCompletionReport.OrderLineCompletion> iterator()
iterator
in interface Iterable<OrderCompletionReport.OrderLineCompletion>
protected boolean canEqual(Object other)
@NonNull public @NonNull Order getOrder()
@NonNull public @NonNull OrderCompletionReport.CompletionStatus getStatus()
Copyright © 2019. All rights reserved.