if (StockTraderUtility.ORDER_TYPE_SELL.equals(orderType)) {
// CHECKME holding is the argument
holding = orderDAO.getHolding(holdingID);
if (holding == null) {
throw new DAOException("No holding entry found for HoldingID<"
+ holdingID + ">");
}
order = orderDAO.createOrder(userID, holding.getQuoteID(),
StockTraderUtility.ORDER_TYPE_SELL, holding.getQuantity(),
holdingID);
} else if (StockTraderUtility.ORDER_TYPE_SELL_ENHANCED
.equals(orderType)) {
holding = orderDAO.getHolding(holdingID);
if (holding == null) {
throw new DAOException("No holding entry found for HoldingID<"
+ holdingID + ">");
}
if (quantity > holding.getQuantity()) {
order = orderDAO.createOrder(userID, holding.getQuoteID(),
StockTraderUtility.ORDER_TYPE_SELL, holding