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
Methods inherited from class org.salespointframework.core.AbstractEntity
equals, hashCode, hasId, isNew
-
Method Details
-
getId
public org.salespointframework.order.OrderLine.OrderLineIdentifier getId()Returns the unique identifier of thisOrderLine.- Specified by:
getIdin interfacePersistable<org.salespointframework.order.OrderLine.OrderLineIdentifier>- Returns:
- will never be null
-
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
-