{//5 days are up to date
upToDate = true;
}
}
SecuritiesMarketPrice price = new SecuritiesMarketPrice();
price.setIsin(isin);
if (doCancelUpdateSecuritiesInformation)
break;
boolean result = false;
int i = 0;
if (upToDate && entry.getAssetname() != null)
getLog().debug("up to date: " + entry.getAsset() + " (" + isin+ ")");
else
{
while (i < managers.length)
{
try
{
result = managers[i].updateInformation(entry, price, currentPrice, exchangeRateManager, userMessageManager);
}
catch (Exception ex)
{
ex.printStackTrace();
}
if (result)
i = managers.length;
else
i++;
}
if (result)
{
Session session = getSessionFactory().getCurrentSession();
getLog().debug("begin transaction");
session.beginTransaction();
session.saveOrUpdate(entry);
if (price.getPrice() != null)
{
getLog().debug("saving price: ", price.getId()," ", price.getIsin()," ", price.getPrice()," ", price.getCurrency()," ", price.getValueDate().getTime());
session.save(price);
getLog().debug("saved price ");
if (currentPrice.getPrice() != null)
{