Package org.salespointframework.order
Class OrderLine
java.lang.Object
org.salespointframework.core.AbstractEntity<org.salespointframework.order.OrderLine.OrderLineIdentifier>
org.salespointframework.order.OrderLine
- All Implemented Interfaces:
Persistable<org.salespointframework.order.OrderLine.OrderLineIdentifier>
@Entity
public class OrderLine
extends AbstractEntity<org.salespointframework.order.OrderLine.OrderLineIdentifier>
An order line represents the price and the
Quantity of a Product that is intended to be purchased as
part of an Order.
Order lines should not be used to represent expenses for services, such as shipping. For this purpose,
ChargeLine should be used instead.
Note that the constructor of this class creates a copy of the product's name and price, so that changes to those attributes do not affect existing orders.
- Author:
- Paul Henke, Oliver Gierke
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionorg.salespointframework.order.OrderLine.OrderLineIdentifiergetId()javax.money.MonetaryAmountgetPrice()booleanbooleanrefersTo(Product.ProductIdentifier identifier) toString()Methods inherited from class org.salespointframework.core.AbstractEntity
equals, hashCode, hasId, isNew
-
Method Details
-
getId
public org.salespointframework.order.OrderLine.OrderLineIdentifier getId()- Specified by:
getIdin interfacePersistable<org.salespointframework.order.OrderLine.OrderLineIdentifier>
-
refersTo
- Parameters:
product- must not be null.- Returns:
- Since:
- 7.1
-
refersTo
- Parameters:
identifier- must not be null.- Returns:
- Since:
- 7.1
-
toString
-
getProductIdentifier
-
getPrice
public javax.money.MonetaryAmount getPrice() -
getQuantity
-
getProductName
-