fr.paris.lutece.plugins.stock.business.purchase.exception
Class PurchaseOutOfStock

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by fr.paris.lutece.plugins.stock.business.purchase.exception.PurchaseException
              extended by fr.paris.lutece.plugins.stock.business.purchase.exception.PurchaseOutOfStock
All Implemented Interfaces:
java.io.Serializable

public class PurchaseOutOfStock
extends PurchaseException

Exception thrown when quantity available for offer is not enough

See Also:
Serialized Form

Constructor Summary
PurchaseOutOfStock(java.lang.Integer purchaseId, java.lang.Integer quantityRequested, java.lang.Integer quantityAvailable, java.lang.String msg)
          Instantiates a new purchase out of stock.
PurchaseOutOfStock(java.lang.Integer purchaseId, java.lang.String msg)
          Instantiates a new purchase out of stock.
 
Method Summary
 java.lang.Integer getPurchaseId()
          Gets the purchase id.
 java.lang.Integer getQuantityAvailable()
          Gets the quantity available.
 java.lang.Integer getQuantityRequested()
          Gets the quantity requested.
 void setPurchaseId(java.lang.Integer purchaseId)
          Sets the purchase id.
 void setQuantityAvailable(java.lang.Integer quantityAvailable)
          Sets the quantity available.
 void setQuantityRequested(java.lang.Integer quantityRequested)
          Sets the quantity requested.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PurchaseOutOfStock

public PurchaseOutOfStock(java.lang.Integer purchaseId,
                          java.lang.String msg)
Instantiates a new purchase out of stock.

Parameters:
purchaseId - the purchase id
msg - the msg

PurchaseOutOfStock

public PurchaseOutOfStock(java.lang.Integer purchaseId,
                          java.lang.Integer quantityRequested,
                          java.lang.Integer quantityAvailable,
                          java.lang.String msg)
Instantiates a new purchase out of stock.

Parameters:
purchaseId - the purchase id
quantityRequested - the quantity requested
quantityAvailable - the quantity available
msg - the msg
Method Detail

getPurchaseId

public java.lang.Integer getPurchaseId()
Gets the purchase id.

Overrides:
getPurchaseId in class PurchaseException
Returns:
the purchaseId

setPurchaseId

public void setPurchaseId(java.lang.Integer purchaseId)
Sets the purchase id.

Overrides:
setPurchaseId in class PurchaseException
Parameters:
purchaseId - the purchaseId to set

getQuantityRequested

public java.lang.Integer getQuantityRequested()
Gets the quantity requested.

Returns:
the quantityRequested

setQuantityRequested

public void setQuantityRequested(java.lang.Integer quantityRequested)
Sets the quantity requested.

Parameters:
quantityRequested - the quantityRequested to set

getQuantityAvailable

public java.lang.Integer getQuantityAvailable()
Gets the quantity available.

Returns:
the quantityAvailable

setQuantityAvailable

public void setQuantityAvailable(java.lang.Integer quantityAvailable)
Sets the quantity available.

Parameters:
quantityAvailable - the quantityAvailable to set


Copyright © 2012 Mairie de Paris. All Rights Reserved.