Class AbstractCharge
- java.lang.Object
-
- de.hybris.order.calculation.domain.AbstractCharge
-
- Direct Known Subclasses:
LineItemCharge
,OrderCharge
public abstract class AbstractCharge extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractCharge.ChargeType
The kind of charge.
-
Constructor Summary
Constructors Constructor Description AbstractCharge(AbstractAmount amount)
Default constructor requiring a spcific amount.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractAmount
getAmount()
AbstractCharge.ChargeType
getChargeType()
Returns the kind of this additional charge.boolean
isDisabled()
void
setChargeType(AbstractCharge.ChargeType chargeType)
Sets the kind of this additional charge.void
setDisabled(boolean disabled)
Marks this charge as disabled, which means that it will be ignored during calculation.
-
-
-
Constructor Detail
-
AbstractCharge
public AbstractCharge(AbstractAmount amount)
Default constructor requiring a spcific amount.
-
-
Method Detail
-
isDisabled
public boolean isDisabled()
- Returns:
- true if this charge will be ignored for calculation.
-
setDisabled
public void setDisabled(boolean disabled)
Marks this charge as disabled, which means that it will be ignored during calculation.
-
getAmount
public AbstractAmount getAmount()
- Returns:
- the amount (in
Percentage
orMoney
of this additional charge.
-
setChargeType
public void setChargeType(AbstractCharge.ChargeType chargeType)
Sets the kind of this additional charge. Can be null.
-
getChargeType
public AbstractCharge.ChargeType getChargeType()
Returns the kind of this additional charge.- Returns:
- null if nothing is set.
-
-