@Entity public class Promotion extends DomainObject
Modifier and Type | Class and Description |
---|---|
static class |
Promotion.Type
The type, like some CAMPAIGN, DISCOUNT, USER COUPON, REFUND etc.
|
Constructor and Description |
---|
Promotion() |
Promotion(Promotion.Type type,
String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getAmountJson()
Details about the Discount/Promotion itself like Amount, Unit, Currency etc.
This JSON is intended to be App specific where the PromotionStrategy can interpret the JSON criteria |
String |
getCriteriaJson()
Any additional Data to describe the Promotion meta-data criteria like who, how many times can the same user use it, how is a user identified, and how people are eligible for it etc.
This JSON is intended to be App specific where the PromotionStrategy can interpret the JSON criteria |
String |
getDescription()
Description for reference purposes
|
String |
getDisplayName()
User friendly name for the promotion
|
String |
getName()
A name to identify the promotion / campaign
Note: Details and rule of how the promotion impacts Quantity for any given user or type of user can be defined by the application in the form of Rules etc. |
Promotion.Type |
getType()
The type, like some CAMPAIGN, DISCOUNT, USER COUPON, REFUND etc.
|
Date |
getValidityEnd()
The validity start Date range and end date range
|
Date |
getValidityStart()
The validity start Date range and end date range
|
int |
hashCode() |
boolean |
isActive()
Is the promotion currently marked active
Useful if we want to disable the promotion temp. |
void |
setActive(boolean active)
Is the promotion currently marked active
Useful if we want to disable the promotion temp. |
void |
setAmountJson(String amountJson)
Details about the Discount/Promotion itself like Amount, Unit, Currency etc.
This JSON is intended to be App specific where the PromotionStrategy can interpret the JSON criteria |
void |
setCriteriaJson(String criteriaJson)
Any additional Data to describe the Promotion meta-data criteria like who, how many times can the same user use it, how is a user identified, and how people are eligible for it etc.
This JSON is intended to be App specific where the PromotionStrategy can interpret the JSON criteria |
void |
setDescription(String description)
Description for reference purposes
|
void |
setDisplayName(String displayName)
User friendly name for the promotion
|
void |
setName(String name)
A name to identify the promotion / campaign
Note: Details and rule of how the promotion impacts Quantity for any given user or type of user can be defined by the application in the form of Rules etc. |
void |
setType(Promotion.Type type)
The type, like some CAMPAIGN, DISCOUNT, USER COUPON, REFUND etc.
|
void |
setValidityEnd(Date validityEnd)
The validity start Date range and end date range
|
void |
setValidityStart(Date validityStart)
The validity start Date range and end date range
|
String |
toString() |
public Promotion()
public Promotion(Promotion.Type type, String name)
public String getName()
SaleStrategy
public void setName(String name)
SaleStrategy
public Date getValidityStart()
public void setValidityStart(Date validityStart)
public Date getValidityEnd()
public void setValidityEnd(Date validityEnd)
public boolean isActive()
public void setActive(boolean active)
public Promotion.Type getType()
SaleStrategy
public void setType(Promotion.Type type)
SaleStrategy
public String getCriteriaJson()
PromotionStrategy
can interpret the JSON criteriapublic void setCriteriaJson(String criteriaJson)
PromotionStrategy
can interpret the JSON criteriapublic String getAmountJson()
PromotionStrategy
can interpret the JSON criteriapublic void setAmountJson(String amountJson)
PromotionStrategy
can interpret the JSON criteriapublic String getDisplayName()
public void setDisplayName(String displayName)
public String getDescription()
public void setDescription(String description)
Copyright © 2018. All rights reserved.