public CompanyInfo mapXigniteCompanyInfo(XigniteDelayedQuote quote) {
    if (quote == null) {
      return null;
    }

    if (quote.getSecurity() == null) {
      throw new IllegalArgumentException(
          "Cannot extract company info from quote with no securities.");
    }

    CompanyInfo info = new CompanyInfo();

    info.setExchange(quote.getSecurity().getMarket());
    info.setName(quote.getSecurity().getName());
    info.setSymbol(quote.getSecurity().getSymbol());

    return info;
  }
Exemplo n.º 2
0
 public void setCompanyInfo(CompanyInfo companyInfo) {
   this.companyInfo = companyInfo;
   companyId = companyInfo == null ? null : companyInfo.getId();
   companyInfo__resolvedKey = companyId;
 }