public class Association extends Promotion
Clients may instantiate this class.
Clients may extend this class.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | PROP_PARENT_PRODUCT
A constant for the parent product property name.
|
static java.lang.String | PROP_PRODUCT
A constant for the product property name.
|
Constructor and Description |
---|
Association()
Default constructor to create a new association.
|
Association(java.lang.String type)
This method constructs an association without an associated product.
|
Association(java.lang.String type, Product product)
This method constructs an association with the specified attributes.
|
Modifier and Type | Method and Description |
---|---|
int | compareTo(java.lang.Object another)
This method compares this object with the specified object for order.
|
boolean | equals(java.lang.Object obj)
This method returns whether this product association is equal to the given object.
|
org.eclipse.swt.graphics.Image | getAssociationImage()
Returns the image of a specific association within the group to display in merchandising associations view.
|
java.lang.String | getAssociationTypeToDisplay()
Returns the type of a specific association within the group to display in merchandising associations view.
|
Product | getParentProduct()
This is a convenience method for retrieving the current setting of the parentProduct property.
|
Product | getProduct()
This is a convenience method for retrieving the current setting of the product property.
|
int | hashCode()
This method returns the hash code value of the object.
|
void | setParentProduct(Product parentProduct)
This is a convenience method for setting the parentProduct property.
|
void | setProduct(Product product)
This is a convenience method for setting the product property.
|
public static final java.lang.String PROP_PARENT_PRODUCT
The value is "parentProduct".
The data stored under the "parentProduct" property is a Product that represents the associations parent product.
public static final java.lang.String PROP_PRODUCT
The value is "product".
The data stored under the "product" property is a Product that represents the product that is being promoted.
public Association()
public Association(java.lang.String type)
public Association(java.lang.String type, Product product)
public final Product getParentProduct()
public final Product getProduct()
public final void setParentProduct(Product parentProduct)
public final void setProduct(Product product)
public java.lang.String getAssociationTypeToDisplay()
The supported association types are Cross-Sell, Up Sell, Down Sell, Accessory and Replacement. Subclass may override this method to add display text for custom type of Associations.
public org.eclipse.swt.graphics.Image getAssociationImage()
The supported association types are Cross-Sell, Up Sell, Down Sell, Accessory and Replacement. Subclass may override this method to add display image for custom type of Associations.
public boolean equals(java.lang.Object obj)
public int compareTo(java.lang.Object another)
public int hashCode()