public class PurchaseOutOfStock extends PurchaseException
Constructor and Description |
---|
PurchaseOutOfStock(Integer purchaseId,
Integer quantityRequested,
Integer quantityAvailable,
String msg)
Instantiates a new purchase out of stock.
|
PurchaseOutOfStock(Integer purchaseId,
String msg)
Instantiates a new purchase out of stock.
|
Modifier and Type | Method and Description |
---|---|
Integer |
getQuantityAvailable()
Gets the quantity available.
|
Integer |
getQuantityRequested()
Gets the quantity requested.
|
void |
setQuantityAvailable(Integer quantityAvailable)
Sets the quantity available.
|
void |
setQuantityRequested(Integer quantityRequested)
Sets the quantity requested.
|
getPurchaseId
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public PurchaseOutOfStock(Integer purchaseId, String msg)
purchaseId
- the purchase idmsg
- the msgpublic PurchaseOutOfStock(Integer purchaseId, Integer quantityRequested, Integer quantityAvailable, String msg)
purchaseId
- the purchase idquantityRequested
- the quantity requestedquantityAvailable
- the quantity availablemsg
- the msgpublic Integer getQuantityRequested()
public void setQuantityRequested(Integer quantityRequested)
quantityRequested
- the quantityRequested to setpublic Integer getQuantityAvailable()
public void setQuantityAvailable(Integer quantityAvailable)
quantityAvailable
- the quantityAvailable to setCopyright © 2021 City of Paris. All rights reserved.