Class ProductPercentageDiscountPromotionModel

  • All Implemented Interfaces:
    java.io.Serializable

    public class ProductPercentageDiscountPromotionModel
    extends ProductPromotionModel
    Generated model class for type ProductPercentageDiscountPromotion first defined at extension promotions.
    See Also:
    Serialized Form
    • Field Detail

      • _TYPECODE

        public static final java.lang.String _TYPECODE
        Generated model type code constant.
        See Also:
        Constant Field Values
      • PERCENTAGEDISCOUNT

        public static final java.lang.String PERCENTAGEDISCOUNT
        Generated constant - Attribute key of ProductPercentageDiscountPromotion.percentageDiscount attribute defined at extension promotions.
        See Also:
        Constant Field Values
      • MESSAGEFIRED

        public static final java.lang.String MESSAGEFIRED
        Generated constant - Attribute key of ProductPercentageDiscountPromotion.messageFired attribute defined at extension promotions.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ProductPercentageDiscountPromotionModel

        public ProductPercentageDiscountPromotionModel()
        Generated constructor - Default constructor for generic creation.
      • ProductPercentageDiscountPromotionModel

        public ProductPercentageDiscountPromotionModel​(ItemModelContext ctx)
        Generated constructor - Default constructor for creation with existing context
        Parameters:
        ctx - the model context to be injected, must not be null
      • ProductPercentageDiscountPromotionModel

        @Deprecated(since="4.1.1",
                    forRemoval=true)
        public ProductPercentageDiscountPromotionModel​(java.lang.String _code)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 4.1.1 Please use the default constructor without parameters
        Generated constructor - Constructor with all mandatory attributes.
        Parameters:
        _code - initial attribute declared by type AbstractPromotion at extension promotions
      • ProductPercentageDiscountPromotionModel

        @Deprecated(since="4.1.1",
                    forRemoval=true)
        public ProductPercentageDiscountPromotionModel​(java.lang.String _code,
                                                       ItemModel _owner)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 4.1.1 Please use the default constructor without parameters
        Generated constructor - for all mandatory and initial attributes.
        Parameters:
        _code - initial attribute declared by type AbstractPromotion at extension promotions
        _owner - initial attribute declared by type Item at extension core
    • Method Detail

      • getMessageFired

        @Accessor(qualifier="messageFired",
                  type=GETTER)
        public java.lang.String getMessageFired()
        Generated method - Getter of the ProductPercentageDiscountPromotion.messageFired attribute defined at extension promotions.
        Returns:
        the messageFired - The message to show when the promotion has fired.
      • getMessageFired

        @Accessor(qualifier="messageFired",
                  type=GETTER)
        public java.lang.String getMessageFired​(java.util.Locale loc)
        Generated method - Getter of the ProductPercentageDiscountPromotion.messageFired attribute defined at extension promotions.
        Parameters:
        loc - the value localization key
        Returns:
        the messageFired - The message to show when the promotion has fired.
        Throws:
        java.lang.IllegalArgumentException - if localization key cannot be mapped to data language
      • getPercentageDiscount

        @Accessor(qualifier="percentageDiscount",
                  type=GETTER)
        public java.lang.Double getPercentageDiscount()
        Generated method - Getter of the ProductPercentageDiscountPromotion.percentageDiscount attribute defined at extension promotions.
        Returns:
        the percentageDiscount - Percentage discount.
      • setMessageFired

        @Accessor(qualifier="messageFired",
                  type=SETTER)
        public void setMessageFired​(java.lang.String value)
        Generated method - Setter of ProductPercentageDiscountPromotion.messageFired attribute defined at extension promotions.
        Parameters:
        value - the messageFired - The message to show when the promotion has fired.
      • setMessageFired

        @Accessor(qualifier="messageFired",
                  type=SETTER)
        public void setMessageFired​(java.lang.String value,
                                    java.util.Locale loc)
        Generated method - Setter of ProductPercentageDiscountPromotion.messageFired attribute defined at extension promotions.
        Parameters:
        value - the messageFired - The message to show when the promotion has fired.
        loc - the value localization key
        Throws:
        java.lang.IllegalArgumentException - if localization key cannot be mapped to data language
      • setPercentageDiscount

        @Accessor(qualifier="percentageDiscount",
                  type=SETTER)
        public void setPercentageDiscount​(java.lang.Double value)
        Generated method - Setter of ProductPercentageDiscountPromotion.percentageDiscount attribute defined at extension promotions.
        Parameters:
        value - the percentageDiscount - Percentage discount.