com.elasticpath.domain.rules.impl
Class RuleParameterImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.impl.AbstractPersistenceImpl
          extended by com.elasticpath.domain.impl.AbstractValueObjectImpl
              extended by com.elasticpath.domain.rules.impl.RuleParameterImpl
All Implemented Interfaces:
EpDomain, Persistence, RuleParameter, ValueObject, java.io.Serializable

public class RuleParameterImpl
extends AbstractValueObjectImpl
implements RuleParameter

Represents a parameter of a rule condition, such as the category that a product must belong to to qualify for a promotion.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Fields inherited from interface com.elasticpath.domain.rules.RuleParameter
BOOLEAN_KEY, BRAND_CODE_KEY, CATEGORY_ID_KEY, CURRENCY_KEY, CUSTOMERGROUP_ID_KEY, DISCOUNT_AMOUNT_KEY, DISCOUNT_PERCENT_KEY, NUM_ITEMS_KEY, PRODUCT_ID_KEY, SHIPPING_SERVICE_LEVEL_ID_KEY, SKU_CODE_KEY, SUBTOTAL_AMOUNT_KEY
 
Constructor Summary
RuleParameterImpl()
          No argument constructor.
RuleParameterImpl(java.lang.String key, java.lang.String value)
          Constructor to create an initialized Rule Parameter.
 
Method Summary
 java.lang.String getDisplayText()
          Get the display text for this parameter.
 java.lang.String getKey()
          Get the parameter key.
 java.lang.String getValue()
          Get the parameter value.
 void setDisplayText(java.lang.String displayText)
          Set the text to be displayed for this parameter.
 void setKey(java.lang.String key)
          Set the parameter key.
 void setValue(java.lang.String value)
          Set the parameter value.
 
Methods inherited from class com.elasticpath.domain.impl.AbstractPersistenceImpl
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

RuleParameterImpl

public RuleParameterImpl()
No argument constructor.


RuleParameterImpl

public RuleParameterImpl(java.lang.String key,
                         java.lang.String value)
Constructor to create an initialized Rule Parameter. Used in unit tests.

Parameters:
key - the parameter key
value - the parameter value
Method Detail

getDisplayText

public java.lang.String getDisplayText()
Get the display text for this parameter.

Specified by:
getDisplayText in interface RuleParameter
Returns:
the the display text, or the parameter value if there is no display text

getKey

public java.lang.String getKey()
Get the parameter key.

Specified by:
getKey in interface RuleParameter
Returns:
the parameter key

getValue

public java.lang.String getValue()
Get the parameter value.

Specified by:
getValue in interface RuleParameter
Returns:
the parameter value

setDisplayText

public void setDisplayText(java.lang.String displayText)
Set the text to be displayed for this parameter. For example, the display text for a sku code id long might be the actual text sku code

Specified by:
setDisplayText in interface RuleParameter
Parameters:
displayText - the text to display

setKey

public void setKey(java.lang.String key)
Set the parameter key.

Specified by:
setKey in interface RuleParameter
Parameters:
key - the parameter key

setValue

public void setValue(java.lang.String value)
Set the parameter value.

Specified by:
setValue in interface RuleParameter
Parameters:
value - the parameter value