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.Object
public java.lang.String toStringBrief()
public boolean isActive()
PromotionIf
isActive
in interface PromotionIf
public 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)
PromotionIf
setActive
in interface PromotionIf
active
- The active to set.public boolean isCumulative()
PromotionIf
isCumulative
in interface PromotionIf
public void setCumulative(boolean cumulative)
PromotionIf
setCumulative
in interface PromotionIf
cumulative
- The cumulative to set.public java.lang.String getCustom1()
getCustom1
in interface PromotionIf
public void setCustom1(java.lang.String custom1)
setCustom1
in interface PromotionIf
custom1
- The custom1 to set.public java.lang.String getCustom2()
getCustom2
in interface PromotionIf
public void setCustom2(java.lang.String custom2)
setCustom2
in interface PromotionIf
custom2
- The custom2 to set.public java.lang.String getCustom3()
getCustom3
in interface PromotionIf
public void setCustom3(java.lang.String custom3)
setCustom3
in interface PromotionIf
custom3
- The custom3 to set.public java.lang.String getCustom4()
getCustom4
in interface PromotionIf
public void setCustom4(java.lang.String custom4)
setCustom4
in interface PromotionIf
custom4
- The custom4 to set.public java.lang.String getCustom5()
getCustom5
in interface PromotionIf
public void setCustom5(java.lang.String custom5)
setCustom5
in interface PromotionIf
custom5
- The custom5 to set.public java.lang.String getCustom6()
getCustom6
in interface PromotionIf
public void setCustom6(java.lang.String custom6)
setCustom6
in interface PromotionIf
custom6
- The custom6 to set.public java.lang.String getCustom7()
getCustom7
in interface PromotionIf
public void setCustom7(java.lang.String custom7)
setCustom7
in interface PromotionIf
custom7
- The custom7 to set.public java.lang.String getCustom8()
getCustom8
in interface PromotionIf
public void setCustom8(java.lang.String custom8)
setCustom8
in interface PromotionIf
custom8
- The custom8 to set.public java.lang.String getCustom9()
getCustom9
in interface PromotionIf
public void setCustom9(java.lang.String custom9)
setCustom9
in interface PromotionIf
custom9
- The custom9 to set.public java.lang.String getCustom10()
getCustom10
in interface PromotionIf
public void setCustom10(java.lang.String custom10)
setCustom10
in interface PromotionIf
custom10
- The custom10 to set.public int getId()
getId
in interface PromotionIf
public void setId(int id)
setId
in interface PromotionIf
id
- The id to set.public java.lang.String getOrderTotalCode()
PromotionIf
getOrderTotalCode
in interface PromotionIf
public void setOrderTotalCode(java.lang.String orderTotalCode)
PromotionIf
setOrderTotalCode
in interface PromotionIf
orderTotalCode
- The orderTotalCode to set.public java.lang.String getName()
PromotionIf
getName
in interface PromotionIf
public void setName(java.lang.String name)
PromotionIf
setName
in interface PromotionIf
name
- The name to set.public java.lang.String getDescription()
PromotionIf
getDescription
in interface PromotionIf
public void setDescription(java.lang.String description)
PromotionIf
setDescription
in interface PromotionIf
description
- The description to set.public boolean isRequiresCoupon()
PromotionIf
isRequiresCoupon
in interface PromotionIf
public void setRequiresCoupon(boolean requiresCoupon)
PromotionIf
setRequiresCoupon
in interface PromotionIf
requiresCoupon
- The requiresCoupon to set.public int getCategoryRule()
PromotionIf
getCategoryRule
in interface PromotionIf
public void setCategoryRule(int categoryRule)
PromotionIf
setCategoryRule
in interface PromotionIf
categoryRule
- The categoryRule to set.public int getCustomerRule()
PromotionIf
getCustomerRule
in interface PromotionIf
public void setCustomerRule(int customerRule)
PromotionIf
setCustomerRule
in interface PromotionIf
customerRule
- The customerRule to set.public int getManufacturerRule()
PromotionIf
getManufacturerRule
in interface PromotionIf
public void setManufacturerRule(int manufacturerRule)
PromotionIf
setManufacturerRule
in interface PromotionIf
manufacturerRule
- The manufacturerRule to set.public int getProductRule()
PromotionIf
getProductRule
in interface PromotionIf
public void setProductRule(int productRule)
PromotionIf
setProductRule
in interface PromotionIf
productRule
- The productRule to set.public OrderProductIf[] getApplicableProducts()
PromotionIf
getApplicableProducts
in interface PromotionIf
public void setApplicableProducts(OrderProductIf[] applicableProducts)
PromotionIf
setApplicableProducts
in interface PromotionIf
applicableProducts
- The applicableProducts to set.public java.util.Calendar getDateAdded()
getDateAdded
in interface PromotionIf
public void setDateAdded(java.util.Calendar dateAdded)
setDateAdded
in interface PromotionIf
dateAdded
- The dateAdded to set.public java.util.Calendar getEndDate()
PromotionIf
getEndDate
in interface PromotionIf
public void setEndDate(java.util.Calendar endDate)
PromotionIf
setEndDate
in interface PromotionIf
endDate
- The endDate to set.public java.util.Calendar getLastModified()
getLastModified
in interface PromotionIf
public void setLastModified(java.util.Calendar lastModified)
setLastModified
in interface PromotionIf
lastModified
- The lastModified to set.public java.util.Calendar getStartDate()
PromotionIf
getStartDate
in interface PromotionIf
public void setStartDate(java.util.Calendar startDate)
PromotionIf
setStartDate
in interface PromotionIf
startDate
- The startDate to set.public CouponIf getCoupon()
PromotionIf
getCoupon
in interface PromotionIf
public void setCoupon(CouponIf coupon)
PromotionIf
setCoupon
in interface PromotionIf
coupon
- The coupon to set.public int getCustomerGroupRule()
PromotionIf
getCustomerGroupRule
in interface PromotionIf
public void setCustomerGroupRule(int customerGroupRule)
PromotionIf
setCustomerGroupRule
in interface PromotionIf
customerGroupRule
- The customerGroupRule to set.public int getMaxUse()
PromotionIf
getMaxUse
in interface PromotionIf
public void setMaxUse(int maxUse)
PromotionIf
setMaxUse
in interface PromotionIf
maxUse
- the maxUse to setpublic int getTotalMaxUse()
PromotionIf
getTotalMaxUse
in interface PromotionIf
public void setTotalMaxUse(int totalMaxUse)
PromotionIf
setTotalMaxUse
in interface PromotionIf
totalMaxUse
- the totalMaxUse to setpublic int getTimesUsed()
PromotionIf
getTimesUsed
in interface PromotionIf
public void setTimesUsed(int timesUsed)
PromotionIf
setTimesUsed
in interface PromotionIf
timesUsed
- the timesUsed to setpublic ProductIf[] getIncludedProducts()
PromotionIf
getIncludedProducts
in interface PromotionIf
public void setIncludedProducts(ProductIf[] includedProducts)
PromotionIf
setIncludedProducts
in interface PromotionIf
includedProducts
- the includedProducts to setpublic ProductIf[] getExcludedProducts()
PromotionIf
getExcludedProducts
in interface PromotionIf
public void setExcludedProducts(ProductIf[] excludedProducts)
PromotionIf
setExcludedProducts
in interface PromotionIf
excludedProducts
- the excludedProducts to setpublic CategoryIf[] getIncludedCategories()
PromotionIf
getIncludedCategories
in interface PromotionIf
public void setIncludedCategories(CategoryIf[] includedCategories)
PromotionIf
setIncludedCategories
in interface PromotionIf
includedCategories
- the includedCategories to setpublic CategoryIf[] getExcludedCategories()
PromotionIf
getExcludedCategories
in interface PromotionIf
public void setExcludedCategories(CategoryIf[] excludedCategories)
PromotionIf
setExcludedCategories
in interface PromotionIf
excludedCategories
- the excludedCategories to setpublic ManufacturerIf[] getIncludedManufacturers()
PromotionIf
getIncludedManufacturers
in interface PromotionIf
public void setIncludedManufacturers(ManufacturerIf[] includedManufacturers)
PromotionIf
setIncludedManufacturers
in interface PromotionIf
includedManufacturers
- the includedManufacturers to setpublic ManufacturerIf[] getExcludedManufacturers()
PromotionIf
getExcludedManufacturers
in interface PromotionIf
public void setExcludedManufacturers(ManufacturerIf[] excludedManufacturers)
PromotionIf
setExcludedManufacturers
in interface PromotionIf
excludedManufacturers
- the excludedManufacturers to setpublic java.lang.String getCustom11()
getCustom11
in interface PromotionIf
public void setCustom11(java.lang.String custom11)
setCustom11
in interface PromotionIf
custom11
- the custom11 to setpublic java.lang.String getCustom12()
getCustom12
in interface PromotionIf
public void setCustom12(java.lang.String custom12)
setCustom12
in interface PromotionIf
custom12
- the custom12 to setpublic java.lang.String getCustom13()
getCustom13
in interface PromotionIf
public void setCustom13(java.lang.String custom13)
setCustom13
in interface PromotionIf
custom13
- the custom13 to setpublic java.lang.String getCustom14()
getCustom14
in interface PromotionIf
public void setCustom14(java.lang.String custom14)
setCustom14
in interface PromotionIf
custom14
- the custom14 to setpublic java.lang.String getCustom15()
getCustom15
in interface PromotionIf
public void setCustom15(java.lang.String custom15)
setCustom15
in interface PromotionIf
custom15
- the custom15 to setpublic java.lang.String getCustom16()
getCustom16
in interface PromotionIf
public void setCustom16(java.lang.String custom16)
setCustom16
in interface PromotionIf
custom16
- the custom16 to setpublic java.lang.String getCustom17()
getCustom17
in interface PromotionIf
public void setCustom17(java.lang.String custom17)
setCustom17
in interface PromotionIf
custom17
- the custom17 to setpublic java.lang.String getCustom18()
getCustom18
in interface PromotionIf
public void setCustom18(java.lang.String custom18)
setCustom18
in interface PromotionIf
custom18
- the custom18 to setpublic java.lang.String getCustom19()
getCustom19
in interface PromotionIf
public void setCustom19(java.lang.String custom19)
setCustom19
in interface PromotionIf
custom19
- the custom19 to setpublic java.lang.String getCustom20()
getCustom20
in interface PromotionIf
public void setCustom20(java.lang.String custom20)
setCustom20
in interface PromotionIf
custom20
- the custom20 to setCopyright © 2018 DS Data Systems UK Ltd.