public class OrderWriter
extends java.lang.Object
Constructor and Description |
---|
OrderWriter(java.util.List<Order> orders)
Return a new OrderWriter.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<Order,OrderProcessException> |
getErrorOrders()
Gets all orders with a processing error
|
java.util.List<Order> |
getExistingOrders()
Gets all duplicated thus already stored orders
|
java.util.List<Order> |
getNewOrders()
Gets all new orders found
|
java.util.Map<Order,java.lang.Exception> |
getStoreOrderErrors()
Gets all orders that could not be stored
|
int |
getTotalErrors()
Return the number of total errors
|
boolean |
isAllStored()
Returns if all new found orders have been stored successfully in the
database.
|
int |
writeOrders()
Writes the new Orders in the database.
|
public OrderWriter(java.util.List<Order> orders) throws OrderProcessException
OrderProcessException
public java.util.Map<Order,OrderProcessException> getErrorOrders()
public java.util.List<Order> getExistingOrders()
public java.util.List<Order> getNewOrders()
public java.util.Map<Order,java.lang.Exception> getStoreOrderErrors()
public int getTotalErrors()
public boolean isAllStored()
public int writeOrders()