Class VoucherModel

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PromotionVoucherModel, SerialVoucherModel

public class VoucherModel extends DiscountModel
Generated model class for type Voucher first defined at extension voucher.
See Also:
  • Field Details

    • _TYPECODE

      public static final String _TYPECODE
      Generated model type code constant.
      See Also:
    • _ORDERDISCOUNTRELATION

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

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

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

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

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

      public static final String INVALIDATIONS
      Generated constant - Attribute key of Voucher.invalidations attribute defined at extension voucher.
      See Also:
  • Constructor Details

    • 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(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(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 Details

    • getDescription

      @Accessor(qualifier="description", type=GETTER) public 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 String getDescription(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:
      IllegalArgumentException - if localization key cannot be mapped to data language
    • getFreeShipping

      @Accessor(qualifier="freeShipping", type=GETTER) public 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 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 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 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(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(String value, 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:
      IllegalArgumentException - if localization key cannot be mapped to data language
    • setFreeShipping

      @Accessor(qualifier="freeShipping", type=SETTER) public void setFreeShipping(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(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(Set<RestrictionModel> value)
      Generated method - Setter of Voucher.restrictions attribute defined at extension voucher.
      Parameters:
      value - the restrictions