public static BigDecimal computeHoldingsTotal(Collection holdingDataBeans) { BigDecimal holdingsTotal = new BigDecimal(0.0).setScale(SCALE); if (holdingDataBeans == null) return holdingsTotal; Iterator it = holdingDataBeans.iterator(); while (it.hasNext()) { HoldingDataBean holdingData = (HoldingDataBean) it.next(); BigDecimal total = holdingData.getPurchasePrice().multiply(new BigDecimal(holdingData.getQuantity())); holdingsTotal = holdingsTotal.add(total); } return holdingsTotal.setScale(SCALE); }
public static BigDecimal computeHoldingsTotal(Collection holdingDataBeans) { BigDecimal holdingsTotal = new BigDecimal(0.0).setScale(SCALE); if (holdingDataBeans == null) return holdingsTotal; Iterator it = holdingDataBeans.iterator(); while (it.hasNext()) { HoldingDataBean holdingData = (HoldingDataBean) it.next(); BigDecimal total = holdingData.getPurchasePrice().multiply(new BigDecimal(holdingData.getQuantity())); holdingsTotal = holdingsTotal.add(total); } return holdingsTotal.setScale(SCALE); }
public String toString() { return "\n\tHolding Data for holding: " + getHoldingID() + "\n\t\t quantity:" + getQuantity() + "\n\t\t purchasePrice:" + getPurchasePrice() + "\n\t\t purchaseDate:" + getPurchaseDate() + "\n\t\t quoteID:" + getQuoteID() ; }
public String toHTML() { return "<BR>Holding Data for holding: " + getHoldingID() + "</B>" + "<LI> quantity:" + getQuantity() + "</LI>" + "<LI> purchasePrice:" + getPurchasePrice() + "</LI>" + "<LI> purchaseDate:" + getPurchaseDate() + "</LI>" + "<LI> quoteID:" + getQuoteID() + "</LI>" ; }
public String toString() { return "\n\tHolding Data for holding: " + getHoldingID() + "\n\t\t quantity:" + getQuantity() + "\n\t\t purchasePrice:" + getPurchasePrice() + "\n\t\t purchaseDate:" + getPurchaseDate() + "\n\t\t quoteID:" + getQuoteID() ; }
public String toHTML() { return "<BR>Holding Data for holding: " + getHoldingID() + "</B>" + "<LI> quantity:" + getQuantity() + "</LI>" + "<LI> purchasePrice:" + getPurchasePrice() + "</LI>" + "<LI> purchaseDate:" + getPurchaseDate() + "</LI>" + "<LI> quoteID:" + getQuoteID() + "</LI>" ; }
static HoldingDataBean convertHoldingDataBean(org.apache.geronimo.samples.daytrader.beans.HoldingDataBean bean) { HoldingDataBean wsBean = new HoldingDataBean(); wsBean.setHoldingID(bean.getHoldingID()); wsBean.setQuantity(bean.getQuantity()); wsBean.setPurchasePrice(bean.getPurchasePrice()); wsBean.setPurchaseDate(toCalendar(bean.getPurchaseDate())); wsBean.setQuoteID(bean.getQuoteID()); return wsBean; }
static HoldingDataBean convertHoldingDataBean(org.apache.geronimo.samples.daytrader.beans.HoldingDataBean bean) { HoldingDataBean wsBean = new HoldingDataBean(); wsBean.setHoldingID(bean.getHoldingID()); wsBean.setQuantity(bean.getQuantity()); wsBean.setPurchasePrice(bean.getPurchasePrice()); wsBean.setPurchaseDate(toCalendar(bean.getPurchaseDate())); wsBean.setQuoteID(bean.getQuoteID()); return wsBean; }