* new Method() that takes EntityManager as a parameter
*/
private OrderDataBean createOrder(AccountDataBean account,
QuoteDataBean quote, HoldingDataBean holding, String orderType,
double quantity, EntityManager entityManager) {
OrderDataBeanImpl order;
if (Log.doTrace())
Log.trace("TradeJpaAm:createOrder(orderID=" + " account="
+ ((account == null) ? null : account.getAccountID())
+ " quote=" + ((quote == null) ? null : quote.getSymbol())
+ " orderType=" + orderType + " quantity=" + quantity);
try {
order = new OrderDataBeanImpl(orderType,
"open",
new Timestamp(System.currentTimeMillis()),
null,
quantity,
quote.getPrice().setScale(FinancialUtils.SCALE, FinancialUtils.ROUND),