Interface OrderMultishipOptionService
- All Known Implementing Classes:
OrderMultishipOptionServiceImpl
public interface OrderMultishipOptionService
Service to interact with OrderMultishipOptions
- Author:
- Andre Azzolini (apazzolini)
-
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates a new instance of the OrderMultishipOption.voidRemoves all OrderMultishipOptions for this Order permanently.voiddeleteOrderItemOrderMultishipOptions(Long orderItemId) Removes all OrderMultishipOptions associated with the OrderItem represented by this orderItemId permanently.voiddeleteOrderItemOrderMultishipOptions(Long orderItemId, int numToDelete) Removes up to numToDelete OrderMultishipOptions associated with the OrderItem represented by this orderItemId permanently.findOrderItemOrderMultishipOptions(Long orderItemId) Finds all OrderMultishipOptions associated with the given Order Item based on the order item idfindOrderMultishipOptions(Long orderId) Finds all OrderMultishipOptions associated with the given Order based on the orderIdGenerates the blank set of OrderMultishipOptions for a given order.getOrderMultishipOptionsFromDTOs(Order order, List<OrderMultishipOptionDTO> optionDtos) Given the (potetially only partially filled out) OrderMultishipOptionDTO objects, builds out the associated OrderMultishipOption objects.If this order has associated OrderMultishipOptions, this method will return those options.save(OrderMultishipOption orderMultishipOption) Saves the given OrderMultishipOption and returns the saved entityvoidsaveOrderMultishipOptions(Order order, List<OrderMultishipOptionDTO> optionDTOs) Associates the appropriate objects based on the OrderMultishipOptionDTOs to OrderMultishipOption instances, associates them with the given order, and saves the set.
-
Method Details
-
save
Saves the given OrderMultishipOption and returns the saved entity- Parameters:
orderMultishipOption-- Returns:
- the saved entity
-
findOrderMultishipOptions
Finds all OrderMultishipOptions associated with the given Order based on the orderId- Parameters:
orderId- the order id to find OrderMultishipOptions for- Returns:
- the associated OrderMultishipOptions
-
findOrderItemOrderMultishipOptions
Finds all OrderMultishipOptions associated with the given Order Item based on the order item id- Parameters:
orderItemId- the orderItem id to find OrderMultishipOptions for- Returns:
- the associated OrderMultishipOptions
-
create
OrderMultishipOption create()Creates a new instance of the OrderMultishipOption. The default Broadleaf implementation will create an instance based on what is configured in the EntityConfiguration.- Returns:
- the newly created OrderMultishipOption
-
deleteAllOrderMultishipOptions
Removes all OrderMultishipOptions for this Order permanently.- Parameters:
order-
-
deleteOrderItemOrderMultishipOptions
Removes all OrderMultishipOptions associated with the OrderItem represented by this orderItemId permanently.- Parameters:
orderItemId-
-
deleteOrderItemOrderMultishipOptions
Removes up to numToDelete OrderMultishipOptions associated with the OrderItem represented by this orderItemId permanently.- Parameters:
orderItemId-numToDelete- the maximum number of occurrences of this orderItemId to delete- See Also:
-
generateOrderMultishipOptions
Generates the blank set of OrderMultishipOptions for a given order. Note that the default Broadleaf implementation splits up all DiscreteOrderItems in the given order into instances of OrderMultishipOption such that each instance assumes its quantity is one. Also note that this will not set the Address or the FulfillmentOption for any of the generated options.- Parameters:
order- the order to generate OrderMultishipOptions for- Returns:
- the OrderMultishipOptions generated for the Order.
-
getOrGenerateOrderMultishipOptions
If this order has associated OrderMultishipOptions, this method will return those options. If there are items in the order that do not have associated options, options for those items will be generated and attached to the existing options.- Parameters:
order-- Returns:
- the OrderMultishipOptions for this Order
- See Also:
-
getOrderMultishipOptionsFromDTOs
List<OrderMultishipOption> getOrderMultishipOptionsFromDTOs(Order order, List<OrderMultishipOptionDTO> optionDtos) Given the (potetially only partially filled out) OrderMultishipOptionDTO objects, builds out the associated OrderMultishipOption objects. This is done by looking up the non-null fields in the optionDtos for their associated entity.Note that the only potentially null fields are address and location ids.
- Parameters:
order-optionDtos-- Returns:
- the associated OrderMultishipOptions
-
saveOrderMultishipOptions
Associates the appropriate objects based on the OrderMultishipOptionDTOs to OrderMultishipOption instances, associates them with the given order, and saves the set.Note that this method will clear any previously saved OrderMultishipOptions for the requested order before performing the save.
- Parameters:
order-optionDTOs-
-