Class AbstractPromotionModel

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
OrderPromotionModel, ProductPromotionModel, RuleBasedPromotionModel

public class AbstractPromotionModel extends ItemModel
Generated model class for type AbstractPromotion first defined at extension promotions.
See Also:
  • Field Details

    • _TYPECODE

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

      public static final String _PROMOTIONGROUPPROMOTIONSRELATION
      Generated relation code constant for relation PromotionGroupPromotionsRelation defining source attribute PromotionGroup in extension promotions.
      See Also:
    • PROMOTIONTYPE

      public static final String PROMOTIONTYPE
      Generated constant - Attribute key of AbstractPromotion.promotionType attribute defined at extension promotions.
      See Also:
    • CODE

      public static final String CODE
      Generated constant - Attribute key of AbstractPromotion.code attribute defined at extension promotions.
      See Also:
    • TITLE

      public static final String TITLE
      Generated constant - Attribute key of AbstractPromotion.title attribute defined at extension promotions.
      See Also:
    • DESCRIPTION

      public static final String DESCRIPTION
      Generated constant - Attribute key of AbstractPromotion.description attribute defined at extension promotions.
      See Also:
    • STARTDATE

      public static final String STARTDATE
      Generated constant - Attribute key of AbstractPromotion.startDate attribute defined at extension promotions.
      See Also:
    • ENDDATE

      public static final String ENDDATE
      Generated constant - Attribute key of AbstractPromotion.endDate attribute defined at extension promotions.
      See Also:
    • DETAILSURL

      public static final String DETAILSURL
      Generated constant - Attribute key of AbstractPromotion.detailsURL attribute defined at extension promotions.
      See Also:
    • RESTRICTIONS

      public static final String RESTRICTIONS
      Generated constant - Attribute key of AbstractPromotion.restrictions attribute defined at extension promotions.
      See Also:
    • ENABLED

      public static final String ENABLED
      Generated constant - Attribute key of AbstractPromotion.enabled attribute defined at extension promotions.
      See Also:
    • PRIORITY

      public static final String PRIORITY
      Generated constant - Attribute key of AbstractPromotion.priority attribute defined at extension promotions.
      See Also:
    • IMMUTABLEKEYHASH

      public static final String IMMUTABLEKEYHASH
      Generated constant - Attribute key of AbstractPromotion.immutableKeyHash attribute defined at extension promotions.
      See Also:
    • IMMUTABLEKEY

      public static final String IMMUTABLEKEY
      Generated constant - Attribute key of AbstractPromotion.immutableKey attribute defined at extension promotions.
      See Also:
    • NAME

      public static final String NAME
      Generated constant - Attribute key of AbstractPromotion.name attribute defined at extension promotions.
      See Also:
    • PROMOTIONGROUP

      public static final String PROMOTIONGROUP
      Generated constant - Attribute key of AbstractPromotion.PromotionGroup attribute defined at extension promotions.
      See Also:
  • Constructor Details

    • AbstractPromotionModel

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

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

      @Deprecated(since="4.1.1", forRemoval=true) public AbstractPromotionModel(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
    • AbstractPromotionModel

      @Deprecated(since="4.1.1", forRemoval=true) public AbstractPromotionModel(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 Details

    • getCode

      @Accessor(qualifier="code", type=GETTER) public String getCode()
      Generated method - Getter of the AbstractPromotion.code attribute defined at extension promotions.
      Returns:
      the code - Identifier for this promotion
    • getDescription

      @Accessor(qualifier="description", type=GETTER) public String getDescription()
      Generated method - Getter of the AbstractPromotion.description attribute defined at extension promotions.
      Returns:
      the description - Description of this promotion
    • getDetailsURL

      @Accessor(qualifier="detailsURL", type=GETTER) public String getDetailsURL()
      Generated method - Getter of the AbstractPromotion.detailsURL attribute defined at extension promotions.
      Returns:
      the detailsURL - URL to a content page with further details of this promotion
    • getEnabled

      @Accessor(qualifier="enabled", type=GETTER) public Boolean getEnabled()
      Generated method - Getter of the AbstractPromotion.enabled attribute defined at extension promotions.
      Returns:
      the enabled - Flag to indicate if this promotion is enabled.
    • getEndDate

      @Accessor(qualifier="endDate", type=GETTER) public Date getEndDate()
      Generated method - Getter of the AbstractPromotion.endDate attribute defined at extension promotions.
      Returns:
      the endDate - Date on which this promotion stops being available, if not set the promotion will not be available.
    • getImmutableKey

      @Accessor(qualifier="immutableKey", type=GETTER) public String getImmutableKey()
      Generated method - Getter of the AbstractPromotion.immutableKey attribute defined at extension promotions.
      Returns:
      the immutableKey - The full immutable identifier for this promotion
    • getImmutableKeyHash

      @Accessor(qualifier="immutableKeyHash", type=GETTER) public String getImmutableKeyHash()
      Generated method - Getter of the AbstractPromotion.immutableKeyHash attribute defined at extension promotions.
      Returns:
      the immutableKeyHash - The HASH of the immutableKey
    • getName

      @Accessor(qualifier="name", type=GETTER) public String getName()
      Generated method - Getter of the AbstractPromotion.name attribute defined at extension promotions.
      Returns:
      the name - Displayable name for this promotion
    • getName

      @Accessor(qualifier="name", type=GETTER) public String getName(Locale loc)
      Generated method - Getter of the AbstractPromotion.name attribute defined at extension promotions.
      Parameters:
      loc - the value localization key
      Returns:
      the name - Displayable name for this promotion
      Throws:
      IllegalArgumentException - if localization key cannot be mapped to data language
    • getPriority

      @Accessor(qualifier="priority", type=GETTER) public Integer getPriority()
      Generated method - Getter of the AbstractPromotion.priority attribute defined at extension promotions.
      Returns:
      the priority - Value to indicate relative priority of promotions. The higher the value the higher the priority.
    • getPromotionGroup

      @Accessor(qualifier="PromotionGroup", type=GETTER) public PromotionGroupModel getPromotionGroup()
      Generated method - Getter of the AbstractPromotion.PromotionGroup attribute defined at extension promotions.
      Returns:
      the PromotionGroup
    • getPromotionType

      @Accessor(qualifier="promotionType", type=GETTER) public String getPromotionType()
      Generated method - Getter of the AbstractPromotion.promotionType attribute defined at extension promotions.
      Returns:
      the promotionType - The type of this promotion.
    • getPromotionType

      @Accessor(qualifier="promotionType", type=GETTER) public String getPromotionType(Locale loc)
      Generated method - Getter of the AbstractPromotion.promotionType attribute defined at extension promotions.
      Parameters:
      loc - the value localization key
      Returns:
      the promotionType - The type of this promotion.
      Throws:
      IllegalArgumentException - if localization key cannot be mapped to data language
    • getRestrictions

      @Accessor(qualifier="restrictions", type=GETTER) public Collection<AbstractPromotionRestrictionModel> getRestrictions()
      Generated method - Getter of the AbstractPromotion.restrictions attribute defined at extension promotions. Consider using FlexibleSearchService::searchRelation for pagination support of large result sets.
      Returns:
      the restrictions - Collection of restrictions that are applied to this promotion
    • getStartDate

      @Accessor(qualifier="startDate", type=GETTER) public Date getStartDate()
      Generated method - Getter of the AbstractPromotion.startDate attribute defined at extension promotions.
      Returns:
      the startDate - Date on which this promotion becomes available, if not set the promotion will not be available.
    • getTitle

      @Accessor(qualifier="title", type=GETTER) public String getTitle()
      Generated method - Getter of the AbstractPromotion.title attribute defined at extension promotions.
      Returns:
      the title - Title for this promotion
    • setCode

      @Accessor(qualifier="code", type=SETTER) public void setCode(String value)
      Generated method - Setter of AbstractPromotion.code attribute defined at extension promotions.
      Parameters:
      value - the code - Identifier for this promotion
    • setDescription

      @Accessor(qualifier="description", type=SETTER) public void setDescription(String value)
      Generated method - Setter of AbstractPromotion.description attribute defined at extension promotions.
      Parameters:
      value - the description - Description of this promotion
    • setDetailsURL

      @Accessor(qualifier="detailsURL", type=SETTER) public void setDetailsURL(String value)
      Generated method - Setter of AbstractPromotion.detailsURL attribute defined at extension promotions.
      Parameters:
      value - the detailsURL - URL to a content page with further details of this promotion
    • setEnabled

      @Accessor(qualifier="enabled", type=SETTER) public void setEnabled(Boolean value)
      Generated method - Setter of AbstractPromotion.enabled attribute defined at extension promotions.
      Parameters:
      value - the enabled - Flag to indicate if this promotion is enabled.
    • setEndDate

      @Accessor(qualifier="endDate", type=SETTER) public void setEndDate(Date value)
      Generated method - Setter of AbstractPromotion.endDate attribute defined at extension promotions.
      Parameters:
      value - the endDate - Date on which this promotion stops being available, if not set the promotion will not be available.
    • setImmutableKey

      @Accessor(qualifier="immutableKey", type=SETTER) public void setImmutableKey(String value)
      Generated method - Setter of AbstractPromotion.immutableKey attribute defined at extension promotions.
      Parameters:
      value - the immutableKey - The full immutable identifier for this promotion
    • setImmutableKeyHash

      @Accessor(qualifier="immutableKeyHash", type=SETTER) public void setImmutableKeyHash(String value)
      Generated method - Setter of AbstractPromotion.immutableKeyHash attribute defined at extension promotions.
      Parameters:
      value - the immutableKeyHash - The HASH of the immutableKey
    • setName

      @Accessor(qualifier="name", type=SETTER) public void setName(String value)
      Generated method - Setter of AbstractPromotion.name attribute defined at extension promotions.
      Parameters:
      value - the name - Displayable name for this promotion
    • setName

      @Accessor(qualifier="name", type=SETTER) public void setName(String value, Locale loc)
      Generated method - Setter of AbstractPromotion.name attribute defined at extension promotions.
      Parameters:
      value - the name - Displayable name for this promotion
      loc - the value localization key
      Throws:
      IllegalArgumentException - if localization key cannot be mapped to data language
    • setPriority

      @Accessor(qualifier="priority", type=SETTER) public void setPriority(Integer value)
      Generated method - Setter of AbstractPromotion.priority attribute defined at extension promotions.
      Parameters:
      value - the priority - Value to indicate relative priority of promotions. The higher the value the higher the priority.
    • setPromotionGroup

      @Accessor(qualifier="PromotionGroup", type=SETTER) public void setPromotionGroup(PromotionGroupModel value)
      Generated method - Setter of AbstractPromotion.PromotionGroup attribute defined at extension promotions.
      Parameters:
      value - the PromotionGroup
    • setRestrictions

      @Accessor(qualifier="restrictions", type=SETTER) public void setRestrictions(Collection<AbstractPromotionRestrictionModel> value)
      Generated method - Setter of AbstractPromotion.restrictions attribute defined at extension promotions.
      Parameters:
      value - the restrictions - Collection of restrictions that are applied to this promotion
    • setStartDate

      @Accessor(qualifier="startDate", type=SETTER) public void setStartDate(Date value)
      Generated method - Setter of AbstractPromotion.startDate attribute defined at extension promotions.
      Parameters:
      value - the startDate - Date on which this promotion becomes available, if not set the promotion will not be available.
    • setTitle

      @Accessor(qualifier="title", type=SETTER) public void setTitle(String value)
      Generated method - Setter of AbstractPromotion.title attribute defined at extension promotions.
      Parameters:
      value - the title - Title for this promotion