public final class PricingModelComparator
extends java.lang.Object
implements java.util.Comparator
Properties:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected boolean |
mIncludeRepositoryId
determines whether to include the repository ID as a secondary sort key
|
protected java.lang.String |
mPricingModelPriorityProperty
name of the pricing model priority property.
|
Constructor and Description |
---|
PricingModelComparator()
Default constructor.
|
PricingModelComparator(boolean pIncludeRepositoryId)
Constructor used to override the default behavior of using repository IDs
as a secondary sort key
|
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares two promotion items for sorting by priority
and and optional secondary sort by repository ID. |
boolean |
equals(java.lang.Object obj) |
boolean |
getIncludeRepositoryId()
Get property includeRepositoryId
|
java.lang.String |
getPricingModelPriorityProperty()
Get property PricingModelPriorityProperty
|
void |
setIncludeRepositoryId(boolean pIncludeRepositoryId)
Set property includeRepositoryId
|
void |
setPricingModelPriorityProperty(java.lang.String pPricingModelPriorityProperty)
Set property PricingModelPriorityProperty
|
public static java.lang.String CLASS_VERSION
protected java.lang.String mPricingModelPriorityProperty
protected boolean mIncludeRepositoryId
public PricingModelComparator()
public PricingModelComparator(boolean pIncludeRepositoryId)
pIncludeRepositoryId
- false to remove repository IDs from consideration
as a secondary sort keypublic void setPricingModelPriorityProperty(java.lang.String pPricingModelPriorityProperty)
pPricingModelPriorityProperty
- new value to setpublic java.lang.String getPricingModelPriorityProperty()
public void setIncludeRepositoryId(boolean pIncludeRepositoryId)
pIncludeRepositoryId
- new value to setpublic boolean getIncludeRepositoryId()
public int compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
o1
- Promotion repository itemo2
- Promotion repository itempublic boolean equals(java.lang.Object obj)
equals
in interface java.util.Comparator
equals
in class java.lang.Object