Interface OrderPartOfMembersCloningStrategy

    • Method Detail

      • cloneAddressForOrder

        AddressModel cloneAddressForOrder​(AddressModel address,
                                          OrderModel order)
        Clones an address and sets the order as the clone's owner.
        Parameters:
        address - address to clone
        order - owning order
        Returns:
        cloned but not persisted AddressModel instance.
      • addressNeedsCloning

        boolean addressNeedsCloning​(AddressModel address,
                                    OrderModel order)
        Checks according to business strategies whether given address needs to be cloned as a part of order's contract.
        Parameters:
        address -
        order -
        Returns:
        true if this address needs to be cloned.
        Throws:
        java.lang.IllegalArgumentException - if order is null
      • clonePaymentInfoForOrder

        PaymentInfoModel clonePaymentInfoForOrder​(PaymentInfoModel paymentInfo,
                                                  OrderModel order)
        Clones a payment info and sets the order as the clone's owner.
        Parameters:
        paymentInfo - payment info to clone
        order - owning order
        Returns:
        cloned but not persisted PaymentInfoModel instance.
      • paymentInfoNeedsCloning

        boolean paymentInfoNeedsCloning​(PaymentInfoModel paymentInfo,
                                        OrderModel order)
        Checks according to business strategies whether given payment info needs to be cloned as a part of order's contract.
        Parameters:
        paymentInfo -
        order -
        Returns:
        true if this address needs to be cloned.
        Throws:
        java.lang.IllegalArgumentException - if order is null