Class VoucherModel

    • Field Detail

      • _TYPECODE

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

        public static final java.lang.String _ORDERDISCOUNTRELATION
        Generated relation code constant for relation OrderDiscountRelation defining source attribute orders in extension core.
        See Also:
        Constant Field Values
      • DESCRIPTION

        public static final java.lang.String DESCRIPTION
        Generated constant - Attribute key of Voucher.description attribute defined at extension voucher.
        See Also:
        Constant Field Values
      • FREESHIPPING

        public static final java.lang.String FREESHIPPING
        Generated constant - Attribute key of Voucher.freeShipping attribute defined at extension voucher.
        See Also:
        Constant Field Values
      • VALUESTRING

        public static final java.lang.String VALUESTRING
        Generated constant - Attribute key of Voucher.valueString attribute defined at extension voucher.
        See Also:
        Constant Field Values
      • RESTRICTIONS

        public static final java.lang.String RESTRICTIONS
        Generated constant - Attribute key of Voucher.restrictions attribute defined at extension voucher.
        See Also:
        Constant Field Values
      • INVALIDATIONS

        public static final java.lang.String INVALIDATIONS
        Generated constant - Attribute key of Voucher.invalidations attribute defined at extension voucher.
        See Also:
        Constant Field Values
    • Constructor Detail

      • VoucherModel

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

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

        @Deprecated(since="4.1.1",
                    forRemoval=true)
        public VoucherModel​(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 Voucher at extension voucher
      • VoucherModel

        @Deprecated(since="4.1.1",
                    forRemoval=true)
        public VoucherModel​(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 Voucher at extension voucher
        _owner - initial attribute declared by type Item at extension core
    • Method Detail

      • getDescription

        @Accessor(qualifier="description",
                  type=GETTER)
        public java.lang.String getDescription()
        Generated method - Getter of the Voucher.description attribute defined at extension voucher.
        Returns:
        the description - the description of the voucher.
      • getDescription

        @Accessor(qualifier="description",
                  type=GETTER)
        public java.lang.String getDescription​(java.util.Locale loc)
        Generated method - Getter of the Voucher.description attribute defined at extension voucher.
        Parameters:
        loc - the value localization key
        Returns:
        the description - the description of the voucher.
        Throws:
        java.lang.IllegalArgumentException - if localization key cannot be mapped to data language
      • getFreeShipping

        @Accessor(qualifier="freeShipping",
                  type=GETTER)
        public java.lang.Boolean getFreeShipping()
        Generated method - Getter of the Voucher.freeShipping attribute defined at extension voucher.
        Returns:
        the freeShipping - Specifies if the order this voucher is applied to is shipped for free (true) or not (false). Default is not (false).
      • getInvalidations

        @Accessor(qualifier="invalidations",
                  type=GETTER)
        public java.util.Collection<VoucherInvalidationModel> getInvalidations()
        Generated method - Getter of the Voucher.invalidations attribute defined at extension voucher. Consider using FlexibleSearchService::searchRelation for pagination support of large result sets.
        Returns:
        the invalidations
      • getRestrictions

        @Accessor(qualifier="restrictions",
                  type=GETTER)
        public java.util.Set<RestrictionModel> getRestrictions()
        Generated method - Getter of the Voucher.restrictions attribute defined at extension voucher. Consider using FlexibleSearchService::searchRelation for pagination support of large result sets.
        Returns:
        the restrictions
      • getValueString

        @Accessor(qualifier="valueString",
                  type=GETTER)
        public java.lang.String getValueString()
        Generated method - Getter of the Voucher.valueString attribute defined at extension voucher.
        Returns:
        the valueString - the value of this voucher to display.
      • setDescription

        @Accessor(qualifier="description",
                  type=SETTER)
        public void setDescription​(java.lang.String value)
        Generated method - Setter of Voucher.description attribute defined at extension voucher.
        Parameters:
        value - the description - the description of the voucher.
      • setDescription

        @Accessor(qualifier="description",
                  type=SETTER)
        public void setDescription​(java.lang.String value,
                                   java.util.Locale loc)
        Generated method - Setter of Voucher.description attribute defined at extension voucher.
        Parameters:
        value - the description - the description of the voucher.
        loc - the value localization key
        Throws:
        java.lang.IllegalArgumentException - if localization key cannot be mapped to data language
      • setFreeShipping

        @Accessor(qualifier="freeShipping",
                  type=SETTER)
        public void setFreeShipping​(java.lang.Boolean value)
        Generated method - Setter of Voucher.freeShipping attribute defined at extension voucher.
        Parameters:
        value - the freeShipping - Specifies if the order this voucher is applied to is shipped for free (true) or not (false). Default is not (false).
      • setInvalidations

        @Accessor(qualifier="invalidations",
                  type=SETTER)
        public void setInvalidations​(java.util.Collection<VoucherInvalidationModel> value)
        Generated method - Setter of Voucher.invalidations attribute defined at extension voucher.
        Parameters:
        value - the invalidations
      • setRestrictions

        @Accessor(qualifier="restrictions",
                  type=SETTER)
        public void setRestrictions​(java.util.Set<RestrictionModel> value)
        Generated method - Setter of Voucher.restrictions attribute defined at extension voucher.
        Parameters:
        value - the restrictions