Class RestrictionModel

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DateRestrictionModel, NewCustomerRestrictionModel, OrderRestrictionModel, ProductRestrictionModel, RegularCustomerOrderQuantityRestrictionModel, RegularCustomerOrderTotalRestrictionModel, UserRestrictionModel

public class RestrictionModel extends ItemModel
Generated model class for type Restriction first defined at extension voucher.
See Also:
  • Field Details

    • _TYPECODE

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

      public static final String _VOUCHERRESTRICTIONSRELATION
      Generated relation code constant for relation VoucherRestrictionsRelation defining source attribute voucher in extension voucher.
      See Also:
    • POSITIVE

      public static final String POSITIVE
      Generated constant - Attribute key of Restriction.positive attribute defined at extension voucher.
      See Also:
    • DESCRIPTION

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

      public static final String VIOLATIONMESSAGE
      Generated constant - Attribute key of Restriction.violationMessage attribute defined at extension voucher.
      See Also:
    • RESTRICTIONTYPE

      public static final String RESTRICTIONTYPE
      Generated constant - Attribute key of Restriction.restrictionType attribute defined at extension voucher.
      See Also:
    • VOUCHERPOS

      public static final String VOUCHERPOS
      Generated constant - Attribute key of Restriction.voucherPOS attribute defined at extension voucher.
      See Also:
    • VOUCHER

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

    • RestrictionModel

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

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

      @Deprecated(since="4.1.1", forRemoval=true) public RestrictionModel(VoucherModel _voucher)
      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:
      _voucher - initial attribute declared by type Restriction at extension voucher
    • RestrictionModel

      @Deprecated(since="4.1.1", forRemoval=true) public RestrictionModel(ItemModel _owner, VoucherModel _voucher)
      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:
      _owner - initial attribute declared by type Item at extension core
      _voucher - initial attribute declared by type Restriction at extension voucher
  • Method Details

    • getDescription

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

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

      @Accessor(qualifier="positive", type=GETTER) public Boolean getPositive()
      Generated method - Getter of the Restriction.positive attribute defined at extension voucher.
      Returns:
      the positive - Specifies if this restriction is a positive (true) or negative (false) one.
    • getRestrictionType

      @Accessor(qualifier="restrictionType", type=GETTER) public String getRestrictionType()
      Generated method - Getter of the Restriction.restrictionType attribute defined at extension voucher.
      Returns:
      the restrictionType - the type of this restriction.
    • getRestrictionType

      @Accessor(qualifier="restrictionType", type=GETTER) public String getRestrictionType(Locale loc)
      Generated method - Getter of the Restriction.restrictionType attribute defined at extension voucher.
      Parameters:
      loc - the value localization key
      Returns:
      the restrictionType - the type of this restriction.
      Throws:
      IllegalArgumentException - if localization key cannot be mapped to data language
    • getViolationMessage

      @Accessor(qualifier="violationMessage", type=GETTER) public String getViolationMessage()
      Generated method - Getter of the Restriction.violationMessage attribute defined at extension voucher.
      Returns:
      the violationMessage - the message to return if the restriction is violated (not fulfilled).
    • getViolationMessage

      @Accessor(qualifier="violationMessage", type=GETTER) public String getViolationMessage(Locale loc)
      Generated method - Getter of the Restriction.violationMessage attribute defined at extension voucher.
      Parameters:
      loc - the value localization key
      Returns:
      the violationMessage - the message to return if the restriction is violated (not fulfilled).
      Throws:
      IllegalArgumentException - if localization key cannot be mapped to data language
    • getVoucher

      @Accessor(qualifier="voucher", type=GETTER) public VoucherModel getVoucher()
      Generated method - Getter of the Restriction.voucher attribute defined at extension voucher.
      Returns:
      the voucher
    • setDescription

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

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

      @Accessor(qualifier="positive", type=SETTER) public void setPositive(Boolean value)
      Generated method - Setter of Restriction.positive attribute defined at extension voucher.
      Parameters:
      value - the positive - Specifies if this restriction is a positive (true) or negative (false) one.
    • setViolationMessage

      @Accessor(qualifier="violationMessage", type=SETTER) public void setViolationMessage(String value)
      Generated method - Setter of Restriction.violationMessage attribute defined at extension voucher.
      Parameters:
      value - the violationMessage - the message to return if the restriction is violated (not fulfilled).
    • setViolationMessage

      @Accessor(qualifier="violationMessage", type=SETTER) public void setViolationMessage(String value, Locale loc)
      Generated method - Setter of Restriction.violationMessage attribute defined at extension voucher.
      Parameters:
      value - the violationMessage - the message to return if the restriction is violated (not fulfilled).
      loc - the value localization key
      Throws:
      IllegalArgumentException - if localization key cannot be mapped to data language
    • setVoucher

      @Accessor(qualifier="voucher", type=SETTER) public void setVoucher(VoucherModel value)
      Generated method - Initial setter of Restriction.voucher attribute defined at extension voucher. Can only be used at creation of model - before first save.
      Parameters:
      value - the voucher