QualificationDiscountDef Interface

com.bea.commerce.ebusiness.discount.mgmt
QualificationDiscountDef Interface

public interface QualificationDiscountDef

    extends Comparable, Serializable

This interface defines the public interface of an immutable discount definition object. Discount definition objects are the run time representation of a discount. Discount are defined in XML discount set definitions. The QualDiscountDefFactory is used to create instance of discount definition objects from the discount set definition


All Superinterfaces
Comparable, Serializable

Field Summary

public static final String
ITEM_DISCOUNT_TYPE
Defines the item discount type
public static final String
ORDER_DISCOUNT_TYPE
Defines the order discount type
 

Method Summary

public boolean
equals(Object obj)
Tests if two discounts are the same
public int
getAllowedUses()
Gets the value of the 'number of uses allowed' parameter for this discount.
public String
getDescription()
Gets this discount's description
public Date
getEndDate()
Gets the discount definition's expiration date
public String
getGlobalDescription()
Gets this discount's global description
public QualificationDiscountId
getId()
Get the QualificationDiscountId (unique identifier) associated with this definition
public DiscountModifier
getModifier()
Gets the DiscountModifier associated with this discount
public String
getName()
Gets this discounts name, discount names are only unique within a given discount set
public int
getPriority()
Gets the priority associated with this definition
public DiscountRule
getRule()
Gets the DiscountRule associated with this discount
public String
getSetName()
Gets the name of the discount set this discount was defined in
public Date
getStartDate()
Gets the discount definition's begin date
public String
getType()
Gets the type of this discount, should be one of the discount type constants defined by this interface
public int
hashCode()
A unique code for this discount
public boolean
isActive()
Gets this discount's active flag
public boolean
isGlobal()
Gets this discount's global flag
public void
setId(QualificationDiscountId newId)
public String
toString()
Gets a String representation of this discount
 
Methods from interface java.lang.Comparable
compareTo
   

Field Detail

ITEM_DISCOUNT_TYPE

public static final String ITEM_DISCOUNT_TYPE
Defines the item discount type


ORDER_DISCOUNT_TYPE

public static final String ORDER_DISCOUNT_TYPE
Defines the order discount type

 

Method Detail

equals(Object) Method

public boolean equals(Object obj)
Tests if two discounts are the same

Overrides
Object.equals(Object)

Parameters

obj
the QualificationDiscountDef to compare this one against

Returns

true if the passed QualificationDiscountDef is the same as this one

getAllowedUses() Method

public int getAllowedUses()
Gets the value of the 'number of uses allowed' parameter for this discount. This is the number of orders the discount may be applied to for a given user. The value must be positive.

Returns

the number of uses allowed

getDescription() Method

public String getDescription()
Gets this discount's description

Returns

this discount's description

getEndDate() Method

public Date getEndDate()
Gets the discount definition's expiration date

Returns

a Date, the discount's expiration date

getGlobalDescription() Method

public String getGlobalDescription()
Gets this discount's global description

Returns

this discount's global description

getId() Method

public QualificationDiscountId getId()
Get the QualificationDiscountId (unique identifier) associated with this definition

Returns

this discounts id (QualificationDiscountId)

getModifier() Method

public DiscountModifier getModifier()
Gets the DiscountModifier associated with this discount

Returns

the DiscountModifier associated with this discount

Related Topics

DiscountModifier


getName() Method

public String getName()
Gets this discounts name, discount names are only unique within a given discount set

Returns

this discount's name

Related Topics

QualificationDiscountDef.getSetName()


getPriority() Method

public int getPriority()
Gets the priority associated with this definition

Returns

this discount's priority

getRule() Method

public DiscountRule getRule()
Gets the DiscountRule associated with this discount

Returns

the DiscountRule associated with this discount

Related Topics

DiscountRule


getSetName() Method

DEPRECATED As of version 4.0, this method now throws an UnsupportedOperationException.

public String getSetName()
Gets the name of the discount set this discount was defined in

Returns

this discount's set name

getStartDate() Method

public Date getStartDate()
Gets the discount definition's begin date

Returns

a Date, the discount's begin date

getType() Method

public String getType()
Gets the type of this discount, should be one of the discount type constants defined by this interface

Returns

this discount's type

hashCode() Method

public int hashCode()
A unique code for this discount

Overrides
Object.hashCode()

Returns

the hashCode for this discount

isActive() Method

public boolean isActive()
Gets this discount's active flag

Returns

true if the discount is active, false otherwise

isGlobal() Method

public boolean isGlobal()
Gets this discount's global flag

Returns

ture if this is a global discount, flase otherwise

setId(QualificationDiscountId) Method

public void setId(QualificationDiscountId newId)

toString() Method

public String toString()
Gets a String representation of this discount

Overrides
Object.toString()

Returns

a String representation of this discount