public class Promotion extends java.lang.Object implements PromotionIf
| Constructor and Description |
|---|
Promotion()
Constructor
|
Promotion(com.workingdogs.village.Record vr,
KKCriteria c)
Instantiates the attributes of the Promotion object from a Record object
|
| Modifier and Type | Method and Description |
|---|---|
OrderProductIf[] |
getApplicableProducts()
Contains an array of OrderProduct objects to which the promotion can be applied.
|
int |
getCategoryRule()
This is the rule linking categories to the promotion.
|
CouponIf |
getCoupon()
There may be a coupon associated with the promotion.
|
java.lang.String |
getCustom1() |
java.lang.String |
getCustom10() |
java.lang.String |
getCustom11() |
java.lang.String |
getCustom12() |
java.lang.String |
getCustom13() |
java.lang.String |
getCustom14() |
java.lang.String |
getCustom15() |
java.lang.String |
getCustom16() |
java.lang.String |
getCustom17() |
java.lang.String |
getCustom18() |
java.lang.String |
getCustom19() |
java.lang.String |
getCustom2() |
java.lang.String |
getCustom20() |
java.lang.String |
getCustom3() |
java.lang.String |
getCustom4() |
java.lang.String |
getCustom5() |
java.lang.String |
getCustom6() |
java.lang.String |
getCustom7() |
java.lang.String |
getCustom8() |
java.lang.String |
getCustom9() |
int |
getCustomerGroupRule()
This is the rule linking customer groups to the promotion.
|
int |
getCustomerRule()
This is the rule linking customers to the promotion.
|
java.util.Calendar |
getDateAdded() |
java.lang.String |
getDescription()
A description of the promotion.
|
java.util.Calendar |
getEndDate()
After this date the promotion is no longer active.
|
CategoryIf[] |
getExcludedCategories()
An array of categories that the promotion excludes.
|
ManufacturerIf[] |
getExcludedManufacturers()
An array of manufacturers that the promotion excludes.
|
ProductIf[] |
getExcludedProducts()
An array of products that the promotion excludes.
|
int |
getId() |
CategoryIf[] |
getIncludedCategories()
An array of categories that the promotion includes.
|
ManufacturerIf[] |
getIncludedManufacturers()
An array of manufacturers that the promotion includes.
|
ProductIf[] |
getIncludedProducts()
An array of products that the promotion includes.
|
java.util.Calendar |
getLastModified() |
int |
getManufacturerRule()
This is the rule linking manufacturers to the promotion.
|
int |
getMaxUse()
The maximum number of times that the promotion can be used by a single customer
|
java.lang.String |
getName()
The promotion name.
|
java.lang.String |
getOrderTotalCode()
The code of the order total module used to calculate the promotion.
|
int |
getProductRule()
This is the rule linking products to the promotion.
|
java.util.Calendar |
getStartDate()
Before this date the promotion is not active.
|
boolean |
getStatus(java.util.Date storeTime)
Returns the status of the object.
|
int |
getTimesUsed()
The number of times that the promotion has been used
|
int |
getTotalMaxUse()
The maximum number of times that the promotion can be used
|
boolean |
isActive()
Set to true if the promotion is active.
|
boolean |
isCumulative()
Set to true if the promotion is cumulative with other promotions.
|
boolean |
isRequiresCoupon()
Does the promotion require a coupon
|
void |
setActive(boolean active)
Set to true if the promotion is active.
|
void |
setApplicableProducts(OrderProductIf[] applicableProducts)
Contains an array of OrderProduct objects to which the promotion can be applied.
|
void |
setCategoryRule(int categoryRule)
This is the rule linking categories to the promotion.
|
void |
setCoupon(CouponIf coupon)
There may be a coupon associated with the promotion.
|
void |
setCumulative(boolean cumulative)
Set to true if the promotion is cumulative with other promotions.
|
void |
setCustom1(java.lang.String custom1) |
void |
setCustom10(java.lang.String custom10) |
void |
setCustom11(java.lang.String custom11) |
void |
setCustom12(java.lang.String custom12) |
void |
setCustom13(java.lang.String custom13) |
void |
setCustom14(java.lang.String custom14) |
void |
setCustom15(java.lang.String custom15) |
void |
setCustom16(java.lang.String custom16) |
void |
setCustom17(java.lang.String custom17) |
void |
setCustom18(java.lang.String custom18) |
void |
setCustom19(java.lang.String custom19) |
void |
setCustom2(java.lang.String custom2) |
void |
setCustom20(java.lang.String custom20) |
void |
setCustom3(java.lang.String custom3) |
void |
setCustom4(java.lang.String custom4) |
void |
setCustom5(java.lang.String custom5) |
void |
setCustom6(java.lang.String custom6) |
void |
setCustom7(java.lang.String custom7) |
void |
setCustom8(java.lang.String custom8) |
void |
setCustom9(java.lang.String custom9) |
void |
setCustomerGroupRule(int customerGroupRule)
This is the rule linking customer groups to the promotion.
|
void |
setCustomerRule(int customerRule)
This is the rule linking customers to the promotion.
|
void |
setDateAdded(java.util.Calendar dateAdded) |
void |
setDescription(java.lang.String description)
A description of the promotion.
|
void |
setEndDate(java.util.Calendar endDate)
After this date the promotion is no longer active.
|
void |
setExcludedCategories(CategoryIf[] excludedCategories)
An array of categories that the promotion excludes.
|
void |
setExcludedManufacturers(ManufacturerIf[] excludedManufacturers)
An array of manufacturers that the promotion excludes.
|
void |
setExcludedProducts(ProductIf[] excludedProducts)
An array of products that the promotion excludes.
|
void |
setId(int id) |
void |
setIncludedCategories(CategoryIf[] includedCategories)
An array of categories that the promotion includes.
|
void |
setIncludedManufacturers(ManufacturerIf[] includedManufacturers)
An array of manufacturers that the promotion includes.
|
void |
setIncludedProducts(ProductIf[] includedProducts)
An array of products that the promotion includes.
|
void |
setLastModified(java.util.Calendar lastModified) |
void |
setManufacturerRule(int manufacturerRule)
This is the rule linking manufacturers to the promotion.
|
void |
setMaxUse(int maxUse)
The maximum number of times that the promotion can be used by a single customer
|
void |
setName(java.lang.String name)
The promotion name.
|
void |
setOrderTotalCode(java.lang.String orderTotalCode)
The code of the order total module used to calculate the promotion.
|
void |
setProductRule(int productRule)
This is the rule linking products to the promotion.
|
void |
setRequiresCoupon(boolean requiresCoupon)
Does the promotion require a coupon
|
void |
setStartDate(java.util.Calendar startDate)
Before this date the promotion is not active.
|
void |
setTimesUsed(int timesUsed)
The number of times that the promotion has been used
|
void |
setTotalMaxUse(int totalMaxUse)
The maximum number of times that the promotion can be used
|
java.lang.String |
toString() |
java.lang.String |
toStringBrief() |
public Promotion()
public Promotion(com.workingdogs.village.Record vr,
KKCriteria c)
throws com.workingdogs.village.DataSetException
vr - Record containing datac - Criteria containing column namescom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringBrief()
public boolean isActive()
PromotionIfisActive in interface PromotionIfpublic boolean getStatus(java.util.Date storeTime)
storeTime - The current storeTime which is used to compare with the start and end dates of the
promotion. If null then the standard time of the server is used.public void setActive(boolean active)
PromotionIfsetActive in interface PromotionIfactive - The active to set.public boolean isCumulative()
PromotionIfisCumulative in interface PromotionIfpublic void setCumulative(boolean cumulative)
PromotionIfsetCumulative in interface PromotionIfcumulative - The cumulative to set.public java.lang.String getCustom1()
getCustom1 in interface PromotionIfpublic void setCustom1(java.lang.String custom1)
setCustom1 in interface PromotionIfcustom1 - The custom1 to set.public java.lang.String getCustom2()
getCustom2 in interface PromotionIfpublic void setCustom2(java.lang.String custom2)
setCustom2 in interface PromotionIfcustom2 - The custom2 to set.public java.lang.String getCustom3()
getCustom3 in interface PromotionIfpublic void setCustom3(java.lang.String custom3)
setCustom3 in interface PromotionIfcustom3 - The custom3 to set.public java.lang.String getCustom4()
getCustom4 in interface PromotionIfpublic void setCustom4(java.lang.String custom4)
setCustom4 in interface PromotionIfcustom4 - The custom4 to set.public java.lang.String getCustom5()
getCustom5 in interface PromotionIfpublic void setCustom5(java.lang.String custom5)
setCustom5 in interface PromotionIfcustom5 - The custom5 to set.public java.lang.String getCustom6()
getCustom6 in interface PromotionIfpublic void setCustom6(java.lang.String custom6)
setCustom6 in interface PromotionIfcustom6 - The custom6 to set.public java.lang.String getCustom7()
getCustom7 in interface PromotionIfpublic void setCustom7(java.lang.String custom7)
setCustom7 in interface PromotionIfcustom7 - The custom7 to set.public java.lang.String getCustom8()
getCustom8 in interface PromotionIfpublic void setCustom8(java.lang.String custom8)
setCustom8 in interface PromotionIfcustom8 - The custom8 to set.public java.lang.String getCustom9()
getCustom9 in interface PromotionIfpublic void setCustom9(java.lang.String custom9)
setCustom9 in interface PromotionIfcustom9 - The custom9 to set.public java.lang.String getCustom10()
getCustom10 in interface PromotionIfpublic void setCustom10(java.lang.String custom10)
setCustom10 in interface PromotionIfcustom10 - The custom10 to set.public int getId()
getId in interface PromotionIfpublic void setId(int id)
setId in interface PromotionIfid - The id to set.public java.lang.String getOrderTotalCode()
PromotionIfgetOrderTotalCode in interface PromotionIfpublic void setOrderTotalCode(java.lang.String orderTotalCode)
PromotionIfsetOrderTotalCode in interface PromotionIforderTotalCode - The orderTotalCode to set.public java.lang.String getName()
PromotionIfgetName in interface PromotionIfpublic void setName(java.lang.String name)
PromotionIfsetName in interface PromotionIfname - The name to set.public java.lang.String getDescription()
PromotionIfgetDescription in interface PromotionIfpublic void setDescription(java.lang.String description)
PromotionIfsetDescription in interface PromotionIfdescription - The description to set.public boolean isRequiresCoupon()
PromotionIfisRequiresCoupon in interface PromotionIfpublic void setRequiresCoupon(boolean requiresCoupon)
PromotionIfsetRequiresCoupon in interface PromotionIfrequiresCoupon - The requiresCoupon to set.public int getCategoryRule()
PromotionIfgetCategoryRule in interface PromotionIfpublic void setCategoryRule(int categoryRule)
PromotionIfsetCategoryRule in interface PromotionIfcategoryRule - The categoryRule to set.public int getCustomerRule()
PromotionIfgetCustomerRule in interface PromotionIfpublic void setCustomerRule(int customerRule)
PromotionIfsetCustomerRule in interface PromotionIfcustomerRule - The customerRule to set.public int getManufacturerRule()
PromotionIfgetManufacturerRule in interface PromotionIfpublic void setManufacturerRule(int manufacturerRule)
PromotionIfsetManufacturerRule in interface PromotionIfmanufacturerRule - The manufacturerRule to set.public int getProductRule()
PromotionIfgetProductRule in interface PromotionIfpublic void setProductRule(int productRule)
PromotionIfsetProductRule in interface PromotionIfproductRule - The productRule to set.public OrderProductIf[] getApplicableProducts()
PromotionIfgetApplicableProducts in interface PromotionIfpublic void setApplicableProducts(OrderProductIf[] applicableProducts)
PromotionIfsetApplicableProducts in interface PromotionIfapplicableProducts - The applicableProducts to set.public java.util.Calendar getDateAdded()
getDateAdded in interface PromotionIfpublic void setDateAdded(java.util.Calendar dateAdded)
setDateAdded in interface PromotionIfdateAdded - The dateAdded to set.public java.util.Calendar getEndDate()
PromotionIfgetEndDate in interface PromotionIfpublic void setEndDate(java.util.Calendar endDate)
PromotionIfsetEndDate in interface PromotionIfendDate - The endDate to set.public java.util.Calendar getLastModified()
getLastModified in interface PromotionIfpublic void setLastModified(java.util.Calendar lastModified)
setLastModified in interface PromotionIflastModified - The lastModified to set.public java.util.Calendar getStartDate()
PromotionIfgetStartDate in interface PromotionIfpublic void setStartDate(java.util.Calendar startDate)
PromotionIfsetStartDate in interface PromotionIfstartDate - The startDate to set.public CouponIf getCoupon()
PromotionIfgetCoupon in interface PromotionIfpublic void setCoupon(CouponIf coupon)
PromotionIfsetCoupon in interface PromotionIfcoupon - The coupon to set.public int getCustomerGroupRule()
PromotionIfgetCustomerGroupRule in interface PromotionIfpublic void setCustomerGroupRule(int customerGroupRule)
PromotionIfsetCustomerGroupRule in interface PromotionIfcustomerGroupRule - The customerGroupRule to set.public int getMaxUse()
PromotionIfgetMaxUse in interface PromotionIfpublic void setMaxUse(int maxUse)
PromotionIfsetMaxUse in interface PromotionIfmaxUse - the maxUse to setpublic int getTotalMaxUse()
PromotionIfgetTotalMaxUse in interface PromotionIfpublic void setTotalMaxUse(int totalMaxUse)
PromotionIfsetTotalMaxUse in interface PromotionIftotalMaxUse - the totalMaxUse to setpublic int getTimesUsed()
PromotionIfgetTimesUsed in interface PromotionIfpublic void setTimesUsed(int timesUsed)
PromotionIfsetTimesUsed in interface PromotionIftimesUsed - the timesUsed to setpublic ProductIf[] getIncludedProducts()
PromotionIfgetIncludedProducts in interface PromotionIfpublic void setIncludedProducts(ProductIf[] includedProducts)
PromotionIfsetIncludedProducts in interface PromotionIfincludedProducts - the includedProducts to setpublic ProductIf[] getExcludedProducts()
PromotionIfgetExcludedProducts in interface PromotionIfpublic void setExcludedProducts(ProductIf[] excludedProducts)
PromotionIfsetExcludedProducts in interface PromotionIfexcludedProducts - the excludedProducts to setpublic CategoryIf[] getIncludedCategories()
PromotionIfgetIncludedCategories in interface PromotionIfpublic void setIncludedCategories(CategoryIf[] includedCategories)
PromotionIfsetIncludedCategories in interface PromotionIfincludedCategories - the includedCategories to setpublic CategoryIf[] getExcludedCategories()
PromotionIfgetExcludedCategories in interface PromotionIfpublic void setExcludedCategories(CategoryIf[] excludedCategories)
PromotionIfsetExcludedCategories in interface PromotionIfexcludedCategories - the excludedCategories to setpublic ManufacturerIf[] getIncludedManufacturers()
PromotionIfgetIncludedManufacturers in interface PromotionIfpublic void setIncludedManufacturers(ManufacturerIf[] includedManufacturers)
PromotionIfsetIncludedManufacturers in interface PromotionIfincludedManufacturers - the includedManufacturers to setpublic ManufacturerIf[] getExcludedManufacturers()
PromotionIfgetExcludedManufacturers in interface PromotionIfpublic void setExcludedManufacturers(ManufacturerIf[] excludedManufacturers)
PromotionIfsetExcludedManufacturers in interface PromotionIfexcludedManufacturers - the excludedManufacturers to setpublic java.lang.String getCustom11()
getCustom11 in interface PromotionIfpublic void setCustom11(java.lang.String custom11)
setCustom11 in interface PromotionIfcustom11 - the custom11 to setpublic java.lang.String getCustom12()
getCustom12 in interface PromotionIfpublic void setCustom12(java.lang.String custom12)
setCustom12 in interface PromotionIfcustom12 - the custom12 to setpublic java.lang.String getCustom13()
getCustom13 in interface PromotionIfpublic void setCustom13(java.lang.String custom13)
setCustom13 in interface PromotionIfcustom13 - the custom13 to setpublic java.lang.String getCustom14()
getCustom14 in interface PromotionIfpublic void setCustom14(java.lang.String custom14)
setCustom14 in interface PromotionIfcustom14 - the custom14 to setpublic java.lang.String getCustom15()
getCustom15 in interface PromotionIfpublic void setCustom15(java.lang.String custom15)
setCustom15 in interface PromotionIfcustom15 - the custom15 to setpublic java.lang.String getCustom16()
getCustom16 in interface PromotionIfpublic void setCustom16(java.lang.String custom16)
setCustom16 in interface PromotionIfcustom16 - the custom16 to setpublic java.lang.String getCustom17()
getCustom17 in interface PromotionIfpublic void setCustom17(java.lang.String custom17)
setCustom17 in interface PromotionIfcustom17 - the custom17 to setpublic java.lang.String getCustom18()
getCustom18 in interface PromotionIfpublic void setCustom18(java.lang.String custom18)
setCustom18 in interface PromotionIfcustom18 - the custom18 to setpublic java.lang.String getCustom19()
getCustom19 in interface PromotionIfpublic void setCustom19(java.lang.String custom19)
setCustom19 in interface PromotionIfcustom19 - the custom19 to setpublic java.lang.String getCustom20()
getCustom20 in interface PromotionIfpublic void setCustom20(java.lang.String custom20)
setCustom20 in interface PromotionIfcustom20 - the custom20 to setCopyright © 2018 DS Data Systems UK Ltd.