Package org.salespointframework.order
Class ChargeLine
java.lang.Object
org.salespointframework.core.AbstractEntity<org.salespointframework.order.ChargeLineIdentifier>
org.salespointframework.order.ChargeLine
- All Implemented Interfaces:
Persistable<org.salespointframework.order.ChargeLineIdentifier>
- Direct Known Subclasses:
ChargeLine.AttachedChargeLine
@Entity public class ChargeLine extends AbstractEntity<org.salespointframework.order.ChargeLineIdentifier>
A charge line represents extra expenses, such as shipping, for an
Order
as a whole. Expenses for an individual OrderLine
can be
modeled using the ChargeLine.AttachedChargeLine
sub-class.
This class is immutable.
- Author:
- Thomas Dedek, Paul Henke, Oliver Gierke
- See Also:
ChargeLine.AttachedChargeLine
,OrderLine
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChargeLine.AttachedChargeLine
AChargeLine
that's attached to anOrderLine
. -
Constructor Summary
Constructors Constructor Description ChargeLine(@NonNull javax.money.MonetaryAmount price, @NonNull String description)
-
Method Summary
Modifier and Type Method Description org.salespointframework.order.ChargeLineIdentifier
getChargeLineIdentifier()
@NonNull String
getDescription()
org.salespointframework.order.ChargeLineIdentifier
getId()
@NonNull javax.money.MonetaryAmount
getPrice()
String
toString()
Methods inherited from class org.salespointframework.core.AbstractEntity
equals, hashCode, hasId, isNew
-
Constructor Details
-
ChargeLine
public ChargeLine(@NonNull @NonNull javax.money.MonetaryAmount price, @NonNull @NonNull String description)
-
-
Method Details
-
getId
public org.salespointframework.order.ChargeLineIdentifier getId()- Specified by:
getId
in interfacePersistable<org.salespointframework.order.ChargeLineIdentifier>
-
getChargeLineIdentifier
public org.salespointframework.order.ChargeLineIdentifier getChargeLineIdentifier() -
getPrice
@NonNull public @NonNull javax.money.MonetaryAmount getPrice() -
getDescription
-
toString
-