@Entity public class PromotionForUser extends DomainObject
Promotion
for a user is uniquely identified by a CODE , userId combination.
This is to support use cases where a single CODE maybe given to multiple people; and multiple users may use the same CODE however keep track.Constructor and Description |
---|
PromotionForUser() |
PromotionForUser(String userId,
String code) |
PromotionForUser(String userId,
String code,
Promotion promotion) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getCode()
A unique code for the Coupon / user combo
This can be pre-generated and a user maybe expected to match this code to avail the pre-generated Coupon |
Long |
getId() |
Date |
getLastAvailed()
When the promotion was last availed by this user
|
Promotion |
getPromotion()
The Promotion name
|
String |
getStatus()
Any status for record keeping
|
Integer |
getUseCount()
Number of times the
Promotion was used by this user |
String |
getUserId()
Identify the user who got the promotion
|
int |
hashCode() |
void |
setCode(String code)
A unique code for the Coupon / user combo
This can be pre-generated and a user maybe expected to match this code to avail the pre-generated Coupon |
void |
setId(Long id) |
void |
setLastAvailed(Date lastAvailed)
When the promotion was last availed by this user
|
void |
setPromotion(Promotion promotion)
The Promotion name
|
void |
setStatus(String status)
Any status for record keeping
|
void |
setUseCount(Integer useCount)
Number of times the
Promotion was used by this user |
void |
setUserId(String userId)
Identify the user who got the promotion
|
String |
toString() |
public static String ANY
public Promotion getPromotion()
public void setPromotion(Promotion promotion)
public String getUserId()
public void setUserId(String userId)
public String getStatus()
public void setStatus(String status)
public Integer getUseCount()
Promotion
was used by this userpublic void setUseCount(Integer useCount)
Promotion
was used by this userpublic Date getLastAvailed()
public void setLastAvailed(Date lastAvailed)
public String getCode()
public void setCode(String code)
public Long getId()
public void setId(Long id)
Copyright © 2018. All rights reserved.