Package org.salespointframework.order
Class ChargeLine
java.lang.Object
org.salespointframework.core.AbstractEntity<ChargeLine.ChargeLineIdentifier>
org.salespointframework.order.ChargeLine
- All Implemented Interfaces:
Persistable<ChargeLine.ChargeLineIdentifier>
- Direct Known Subclasses:
ChargeLine.AttachedChargeLine
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
AChargeLine
that's attached to anOrderLine
.static final class
ChargeLine.ChargeLineIdentifier
serves as an identifier type forChargeLine
objects. -
Constructor Summary
ConstructorDescriptionChargeLine
(@NonNull javax.money.MonetaryAmount price, @NonNull String description) -
Method Summary
Modifier and TypeMethodDescription@NonNull String
getId()
Returns the unique identifier of thisChargeLine
.@NonNull javax.money.MonetaryAmount
getPrice()
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
Returns the unique identifier of thisChargeLine
.- Specified by:
getId
in interfacePersistable<ChargeLine.ChargeLineIdentifier>
- Returns:
- will never be null
-
getChargeLineIdentifier
-
getPrice
@NonNull public @NonNull javax.money.MonetaryAmount getPrice() -
getDescription
-
toString
-