@Entity public class Product extends AbstractEntity<ProductIdentifier> implements Comparable<Product>
| Modifier | Constructor and Description |
|---|---|
protected |
Product()
Deprecated.
|
|
Product(String name,
org.joda.money.Money price,
Metric metric)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCategory(String category) |
int |
compareTo(Product other) |
Iterable<String> |
getCategories() |
ProductIdentifier |
getIdentifier()
Returns the
SalespointIdentifier. |
String |
getName() |
org.joda.money.Money |
getPrice() |
boolean |
removeCategory(String category) |
void |
setName(String name) |
void |
setPrice(org.joda.money.Money price) |
boolean |
supports(Quantity quantity)
|
String |
toString() |
void |
verify(Quantity quantity)
|
equals, getId, hashCode, isNew@Deprecated protected Product()
public final ProductIdentifier getIdentifier()
AbstractEntitySalespointIdentifier.getIdentifier in class AbstractEntity<ProductIdentifier>public String getName()
public void setName(String name)
public org.joda.money.Money getPrice()
public void setPrice(org.joda.money.Money price)
public final boolean addCategory(String category)
public final boolean removeCategory(String category)
public boolean supports(Quantity quantity)
quantity - public void verify(Quantity quantity)
quantity - MetricMismatchException - in case the Product does not support the given Quantity.public int compareTo(Product other)
compareTo in interface Comparable<Product>Copyright © 2014 Pivotal Software, Inc.. All rights reserved.