@Override public Map<ExternalIdBundle, UniqueId> loadSecurities( Iterable<ExternalIdBundle> externalIdBundles) { SecurityLoaderRequest request = SecurityLoaderRequest.create(externalIdBundles); SecurityLoaderResult result = loadSecurities(request); return result.getResultMap(); }
// ------------------------------------------------------------------------- // delegate convenience methods to request/result method // code copied from AbstractSecurityLoader due to lack of multiple inheritance @Override public UniqueId loadSecurity(ExternalIdBundle externalIdBundle) { SecurityLoaderRequest request = SecurityLoaderRequest.create(externalIdBundle); SecurityLoaderResult result = loadSecurities(request); if (result.getResultMap().size() == 0) { throw new OpenGammaRuntimeException("Unable to load security: " + externalIdBundle); } return Iterables.getOnlyElement(result.getResultMap().values()); }