@Entity public class Inventory extends Object implements Serializable
Modifier | Constructor and Description |
---|---|
protected |
Inventory() |
Modifier and Type | Method and Description |
---|---|
void |
decrement(int sold)
Decrement this inventory by the given quantity.
|
Book |
getBook()
Gets the Book that this inventory represents.
|
int |
getInStock()
Gets the available quantity.
|
int |
getSold()
Gets the quantity sold so far.
|
int |
getSupplied()
Gets the quantity supplied so far.
|
int |
getVersion() |
void |
increment(int supplied)
Increment this inventory by the given quantity.
|
public Book getBook()
public int getInStock()
public int getSupplied()
public int getSold()
public void increment(int supplied)
supplied
- must be positive.public void decrement(int sold)
sold
- must be positive.public int getVersion()
Copyright © 2006–2018 Apache Software Foundation. All rights reserved.