AccountDataBeanImpl account = (AccountDataBeanImpl) findaccountid.getSingleResult();
Integer accountid = account.getAccountID();
Query updateStatus = entityManager.createNativeQuery("UPDATE orderejb o SET o.orderStatus = 'completed' WHERE "
+ "o.orderStatus = 'closed' AND o.ACCOUNT_ACCOUNTID = ?");
updateStatus.setParameter(1, accountid.intValue());
updateStatus.executeUpdate();
}
return results;
}
catch (Exception e) {
Log.error("TradeJpaCm.getClosedOrders", e);