public class MarketingPromotion extends Promotion
Modifier and Type | Field and Description |
---|---|
static java.lang.String | PROP_DESCRIPTION
A constant for the Promotion Description property name.
|
static java.lang.String | PROP_PRODUCT
A constant for the Product property name.
|
static java.lang.String | PROP_PRODUCT_ID
A constant for the Product Id property name.
|
static java.lang.String | PROP_PROMOTION_ID
A constant for the Promotion Id property name.
|
Constructor and Description |
---|
MarketingPromotion()
Default constructor for Marketing Promotion.
|
Modifier and Type | Method and Description |
---|---|
int | compareTo(java.lang.Object object)
This method compares this promotion object with the specified object for order.
|
java.lang.String | getDescription()
This method returns the promotion description, an empty string will be return if the value is not set
|
Product | getProduct()
This method returns the product if promotion type is PRODUCT, null will be return if the product is not set of if the promotion type is not of type PRODUCT.
|
java.lang.String | getProductId()
This method returns the product Id if promotion type is PRODUCT.
|
java.lang.String | getPromotionId()
This method returns the promotion Id, an empty string will be return if the value is not set
|
void | setDescription(java.lang.String description)
This method sets the promotion description.
|
void | setProduct(Product product)
This method sets the product.
|
void | setPromotionId(java.lang.String promotionId)
This method sets the promotion id.
|
public static final java.lang.String PROP_PROMOTION_ID
The value is "promotionId".
The data stored under the PROP_PROMOTION_ID property is a String This properties represents the Promotion Id
public static final java.lang.String PROP_DESCRIPTION
The value is "description".
The data stored under the PROP_DESCRIPTION property is a String This properties represents the Promotion Description
public static final java.lang.String PROP_PRODUCT
The value is "product".
The data stored under the PROP_PRODUCT property is a Product If the promotion type is of type PRODUCT, this properties represents the target product. This properties is not useful for other kind of promotions
public static final java.lang.String PROP_PRODUCT_ID
The value is "productId".
The data stored under the PROP_PRODUCT_ID property is the product Id. If the promotion type is of type PRODUCT, this properties represents the target product's Id. This properties is not useful for other kind of promotions.
public MarketingPromotion()
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public void setPromotionId(java.lang.String promotionId)
public java.lang.String getPromotionId()
public void setProduct(Product product)
public Product getProduct()
public java.lang.String getProductId()
public int compareTo(java.lang.Object object)
The order is decided by comparing the promotion id and if the promotion id is equal, then by comparing the product id. (The same promotion could be applied to different products if it is a product level promotion).