private ManageableSecurity getSecurity(ExternalId underlyingIdentifier) { if (underlyingIdentifier == null) { return null; } SecurityMaster securityMaster = data().getSecurityMaster(); SecuritySearchRequest request = new SecuritySearchRequest(); request.addExternalId(underlyingIdentifier); SecuritySearchResult search = securityMaster.search(request); return search.getFirstSecurity(); }
/** * Creates an instance using a single search identifier. * * @param securityId the security external identifier to search for, not null */ public SecuritySearchRequest(ExternalId securityId) { addExternalId(securityId); }