@Entity public class OrderLine extends AbstractEntity<org.salespointframework.order.OrderLineIdentifier>
Modifier and Type | Method and Description |
---|---|
org.salespointframework.order.OrderLineIdentifier |
getId() |
javax.money.MonetaryAmount |
getPrice()
Returns the price of the item.
|
ProductIdentifier |
getProductIdentifier() |
String |
getProductName() |
Quantity |
getQuantity() |
boolean |
refersTo(Product product)
|
boolean |
refersTo(ProductIdentifier identifier)
|
static javax.money.MonetaryAmount |
sumUp(Iterable<? extends org.salespointframework.order.Priced> priced)
Sums up the prices of all given
Priced instances. |
String |
toString() |
equals, hashCode, isNew
public org.salespointframework.order.OrderLineIdentifier getId()
getId
in interface org.springframework.data.domain.Persistable<org.salespointframework.order.OrderLineIdentifier>
public boolean refersTo(Product product)
product
- must not be null.public boolean refersTo(ProductIdentifier identifier)
identifier
- must not be null.public ProductIdentifier getProductIdentifier()
public javax.money.MonetaryAmount getPrice()
public Quantity getQuantity()
public String getProductName()
public static javax.money.MonetaryAmount sumUp(Iterable<? extends org.salespointframework.order.Priced> priced)
Priced
instances.priced
- must not be null.Copyright © 2019. All rights reserved.