Serializable
This interface represents the public interface to the
DiscountAssociation
object. A DiscountAssociation
object is an immutable representation of a discount association. A discount
association is the mapping of a Customer
to a
Discount
and it's primary purpose is to tack and limit how many
times discount is used by a particular customer
Serializable
Method Summary |
public boolean | |
public |
|
public |
|
public |
|
public int |
|
public |
|
public int |
|
public boolean |
|
public |
|
Method Detail |
public boolean equals(Object
obj)
Tests if two discount associations are the same
Object.equals(Object)
DiscountAssociation
to compare this one
against DiscountAssociation
is the
same as this one
public String
getDescription()
Get the description for this discount association. This description will
only be present if the discount in this association is not global. The
description will provide some indication of how or why the user is
associated with the discount
public Integer
getId()
Gets this discount association's unique id
public QualificationDiscountId
getQualDiscountId()
Gets the id of the discount for this discount association
QualificationDiscountId
for this discount association public int getUseCount()Gets the current use count for this discount association, that is the number of times the user in the association has used the discount in this association. This number should not exceed the
allowedUses
values specified by the discount
Returns
- the number of time the user has used the discount
Related Topics
QualificationDiscountDef.getAllowedUses()
getUser() Method
public CustomerPk
getUser()
Gets this discount association's Customer
or more
specifically the CustomerPK
Returns
- discount association's
CustomerPK
hashCode() Method
public int hashCode()
A unique code for this discount association
-
Overrides
-
Object.hashCode()
Returns
- the hashCode for this discount association
isGlobal() Method
public boolean isGlobal()
Gets the value of the the global flag for the discount in this discount
association
Returns
- ture if the discount in this association is global, flase if it
is not
toString() Method
public String
toString()
Gets a String representation of this discount
-
Overrides
-
Object.toString()
Returns
- a
String representation of this discount