private HoldingDataBean createHolding(AccountDataBean account, QuoteDataBean quote, double quantity, BigDecimal purchasePrice) throws Exception { HoldingDataBean newHolding = new HoldingDataBean(quantity, purchasePrice, new Timestamp(System.currentTimeMillis()), account, quote); entityManager.persist(newHolding); return newHolding; }
private HoldingDataBean createHolding(AccountDataBean account, QuoteDataBean quote, double quantity, BigDecimal purchasePrice, EntityManager entityManager) throws Exception { HoldingDataBean newHolding = new HoldingDataBean(quantity, purchasePrice, new Timestamp(System.currentTimeMillis()), account, quote); entityManager.persist(newHolding); return newHolding; }
private HoldingDataBean createHolding(AccountDataBean account, QuoteDataBean quote, double quantity, BigDecimal purchasePrice, EntityManager entityManager) throws Exception { HoldingDataBean newHolding = new HoldingDataBean(quantity, purchasePrice, new Timestamp(System.currentTimeMillis()), account, quote); entityManager.persist(newHolding); return newHolding; }
private HoldingDataBean createHolding(AccountDataBean account, QuoteDataBean quote, double quantity, BigDecimal purchasePrice) throws Exception { HoldingDataBean newHolding = new HoldingDataBean(quantity, purchasePrice, new Timestamp(System.currentTimeMillis()), account, quote); entityManager.persist(newHolding); return newHolding; }
private HoldingDataBean getHoldingDataFromResultSet(ResultSet rs) throws Exception { HoldingDataBean holdingData = null; holdingData = new HoldingDataBean(new Integer(rs.getInt("holdingID")), rs.getDouble("quantity"), rs .getBigDecimal("purchasePrice"), rs.getTimestamp("purchaseDate"), rs.getString("quote_symbol")); return holdingData; }
private HoldingDataBean getHoldingDataFromResultSet(ResultSet rs) throws Exception { HoldingDataBean holdingData = null; holdingData = new HoldingDataBean(new Integer(rs.getInt("holdingID")), rs.getDouble("quantity"), rs .getBigDecimal("purchasePrice"), rs.getTimestamp("purchaseDate"), rs.getString("quote_symbol")); return holdingData; }
private HoldingDataBean getHoldingDataFromResultSet(ResultSet rs) throws Exception { HoldingDataBean holdingData = null; holdingData = new HoldingDataBean(new Integer(rs.getInt("holdingID")), rs.getDouble("quantity"), rs .getBigDecimal("purchasePrice"), rs.getTimestamp("purchaseDate"), rs.getString("quote_symbol")); return holdingData; }
private HoldingDataBean getHoldingDataFromResultSet(ResultSet rs) throws Exception { HoldingDataBean holdingData = null; holdingData = new HoldingDataBean(new Integer(rs.getInt("holdingID")), rs.getDouble("quantity"), rs .getBigDecimal("purchasePrice"), rs.getTimestamp("purchaseDate"), rs.getString("quote_symbol")); return holdingData; }
private HoldingDataBean createHolding(AccountDataBean account, QuoteDataBean quote, double quantity, BigDecimal purchasePrice, EntityManager entityManager) throws Exception { HoldingDataBean newHolding = new HoldingDataBean(quantity, purchasePrice, new Timestamp(System.currentTimeMillis()), account, quote); try { /* * manage transactions */ entityManager.getTransaction().begin(); entityManager.persist(newHolding); entityManager.getTransaction().commit(); } catch (Exception e) { entityManager.getTransaction().rollback(); } finally { entityManager.close(); } return newHolding; }
public static HoldingDataBean getRandomInstance() { return new HoldingDataBean( new Integer(TradeConfig.rndInt(100000)), //holdingID TradeConfig.rndQuantity(), //quantity TradeConfig.rndBigDecimal(1000.0f), //purchasePrice new java.util.Date(TradeConfig.rndInt(Integer.MAX_VALUE)), //purchaseDate TradeConfig.rndSymbol() // symbol ); }
public static HoldingDataBean getRandomInstance() { return new HoldingDataBean( new Integer(TradeConfig.rndInt(100000)), //holdingID TradeConfig.rndQuantity(), //quantity TradeConfig.rndBigDecimal(1000.0f), //purchasePrice new java.util.Date(TradeConfig.rndInt(Integer.MAX_VALUE)), //purchaseDate TradeConfig.rndSymbol() // symbol ); }
private org.apache.geronimo.samples.daytrader.beans.HoldingDataBean convertHoldingDataBean(org.apache.geronimo.samples.daytrader.client.ws.HoldingDataBean bean) { return new org.apache.geronimo.samples.daytrader.beans.HoldingDataBean( bean.getHoldingID(), bean.getQuantity(), bean.getPurchasePrice(), bean.getPurchaseDate().getTime(), bean.getQuoteID()); }
private org.apache.geronimo.samples.daytrader.beans.HoldingDataBean convertHoldingDataBean(org.apache.geronimo.samples.daytrader.client.ws.HoldingDataBean bean) { return new org.apache.geronimo.samples.daytrader.beans.HoldingDataBean( bean.getHoldingID(), bean.getQuantity(), bean.getPurchasePrice(), bean.getPurchaseDate().getTime(), bean.getQuoteID()); }
newHolding = new HoldingDataBean(quantity, price, new Timestamp(System.currentTimeMillis()), account, quote); entityManager.persist(newHolding);